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.
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 contenttweak-sys-config.sh
runs asroot
only once (unlike.profile
that may run many times) upon desktop user singin with$USER
environment variable initialized to user login.