I have a Multi-Desktop Environment with Unity and KDE. Because of reasons, I installed only the environments without the specific tools, like
Since the users (They are multi-user PCs) needs those tools to work, I've written a script, which installs the specific tools for the environment the user is logged in and removes the others (i.e., the user logged into
KDE, the script installs
dolphin and removes
nautilus). This works quite well, unfortunately the users have to remember to run it.
I wanted to automate this process by adding this script to
lightdm, by placing a config-file at
/usr/share/lightdm/lightdm.conf.d looking like this:
and performing the check for the environment inside the called script, with:
case "$DESKTOP_SESSION" in ubuntu) do stuff.... ; esac
but as stated in the heading, the variable isn't set at this point.
I've also tried to add a script which only contained the installing and removing part to the
/usr/share/xsessions script, but that also failed, since I didn't had root-permission at that point. And I can't change the sudoers rule to enable
apt-get for non-root users, since I don't want anyone to be able to install software to those maschines.
Does anyone have a soultion for this? Or at least a good idea, how I could fix this?