Run a script as root upon user login into XFCE

Clash Royale CLAN TAG#URR8PPP up vote
1
down vote
favorite
I am setting up a "special" environment for user john on my workstation running XFCE desktop. When john signs I want to tweak system configuration which requires root access. I am looking for a way to run a script as root upon user signing into XFCE which would check user name and make tweaks as necessary.
My research led me to the idea of putting my script in /etc/lightdm/lightdm.conf.d/ and use session-setup-script. But am not sure if it is the right place. I need an advice from a guru.
xubuntu startup root
add a comment |Â
up vote
1
down vote
favorite
I am setting up a "special" environment for user john on my workstation running XFCE desktop. When john signs I want to tweak system configuration which requires root access. I am looking for a way to run a script as root upon user signing into XFCE which would check user name and make tweaks as necessary.
My research led me to the idea of putting my script in /etc/lightdm/lightdm.conf.d/ and use session-setup-script. But am not sure if it is the right place. I need an advice from a guru.
xubuntu startup root
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am setting up a "special" environment for user john on my workstation running XFCE desktop. When john signs I want to tweak system configuration which requires root access. I am looking for a way to run a script as root upon user signing into XFCE which would check user name and make tweaks as necessary.
My research led me to the idea of putting my script in /etc/lightdm/lightdm.conf.d/ and use session-setup-script. But am not sure if it is the right place. I need an advice from a guru.
xubuntu startup root
I am setting up a "special" environment for user john on my workstation running XFCE desktop. When john signs I want to tweak system configuration which requires root access. I am looking for a way to run a script as root upon user signing into XFCE which would check user name and make tweaks as necessary.
My research led me to the idea of putting my script in /etc/lightdm/lightdm.conf.d/ and use session-setup-script. But am not sure if it is the right place. I need an advice from a guru.
xubuntu startup root
xubuntu startup root
asked Feb 3 at 3:22
oá´ÂùÃÂÃÂ¥ÃÂ
230214
230214
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
Ok, I figured out a working solution just the way I need it.
I created a file /etc/lightdm/lightdm.conf.d/kids.conf with content
[Seat:*]
session-setup-script=/root/bin/tweak-sys-config.sh
tweak-sys-config.sh runs as root only once (unlike .profile that may run many times) upon desktop user singin with $USER environment variable initialized to user login.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Ok, I figured out a working solution just the way I need it.
I created a file /etc/lightdm/lightdm.conf.d/kids.conf with content
[Seat:*]
session-setup-script=/root/bin/tweak-sys-config.sh
tweak-sys-config.sh runs as root only once (unlike .profile that may run many times) upon desktop user singin with $USER environment variable initialized to user login.
add a comment |Â
up vote
1
down vote
Ok, I figured out a working solution just the way I need it.
I created a file /etc/lightdm/lightdm.conf.d/kids.conf with content
[Seat:*]
session-setup-script=/root/bin/tweak-sys-config.sh
tweak-sys-config.sh runs as root only once (unlike .profile that may run many times) upon desktop user singin with $USER environment variable initialized to user login.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Ok, I figured out a working solution just the way I need it.
I created a file /etc/lightdm/lightdm.conf.d/kids.conf with content
[Seat:*]
session-setup-script=/root/bin/tweak-sys-config.sh
tweak-sys-config.sh runs as root only once (unlike .profile that may run many times) upon desktop user singin with $USER environment variable initialized to user login.
Ok, I figured out a working solution just the way I need it.
I created a file /etc/lightdm/lightdm.conf.d/kids.conf with content
[Seat:*]
session-setup-script=/root/bin/tweak-sys-config.sh
tweak-sys-config.sh runs as root only once (unlike .profile that may run many times) upon desktop user singin with $USER environment variable initialized to user login.
answered Feb 4 at 4:39
oá´ÂùÃÂÃÂ¥ÃÂ
230214
230214
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1002543%2frun-a-script-as-root-upon-user-login-into-xfce%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password