I want to run a script when I log out through unity. I read something about lightdm but I don't really know what it is and the config file didn't exist. The config file mentioned here doesn't exist! And manualy creating it doesn't solve my problem.
Asked
Active
Viewed 5,270 times
1 Answers
9
Open terminal ( or also known as command line ) by pressing together CtrlAltT or by finding it in dash.
Run this command
sudo gedit /etc/lightdm/lightdm.conf. This opens text editor with lightdm.conf file located in/etc/lightdmfolder.In the file you should have this line
[SeatDefaults]. Bellow this line , entersession-cleanup-script=/path/to/your-script.sh, where /path/to/your-script.sh is the actuall address of the script that you want to run. Note: make sure your script is set to executable by runningsudo chmod +x /path/to/script.shSave and exit
NOTE: as of 14.04 version, the config file doesn't exist and must be created manually OR copied from an example file using the following command
sudo sh -c ' zcat /usr/share/doc/lightdm/lightdm.conf.gz > /etc/lightdm/lightdm.conf`
Sergiy Kolodyazhnyy
- 107,582