Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'd like to run a script on shut down, which interrupts the logout process and and pops up a window with zenity. My target is to get autofsck working with lightdm. It seems to work with 12.04 after installing the old *.deb file, if one runs the check script manually. In order to use it, it should run automatically on log out and ask the user if she/he wants to check the disc on shutdown.

There is the option session-cleanup-script in the file /etc/lightdm/lightdm.conf which seems to work, if a bash file with full path is used (I can't place the command directly there). But if I press shutdown, there is no time for a user choice.

Is there any other option to solve this problem?

Edit: It seems as if there are also other problems specificially with AutoFsck. The session clean up script runs, but the check command for AutoFsck does not run.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.