1

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.

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .