Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a workaround to run a lightdm script? The one in the docs doesn't work. Anything placed there will prevent X from working.

The script I would like to use is my KVM utility synergy. I thought for a while it was synergy that was causing the problems. However, I found that anytime there is a lightdm.conf file with anything on that line X will fail to load.



The file is simply a shell command to indicate it ran:
date >> /tmp/test.log

Thanks in advance for anyone who has any input, or as I mentioned a workaround so that I could have a resource that will run upon X startup before the user actually logs in.

share|improve this question
up vote 2 down vote accepted

During the past week I saw this problem many times doing my research and effort to fix it. It turns out that any entries placed in a "lightdm.conf" file for Ubuntu 13.10 will break lightdm.

There is an entry in the lightdm.conf.d provided for this. I added my KVM script to:


This works!

share|improve this answer

If you can't login normally because a file 50-unity-greeter.conf has been impaired, you can try this:

  • PressCtrl+F6
  • Input Login and your password
  • Type startx
  • Open any directory and go to a hardDisk and search greeter.

When you see for example: unity-greeter_14.04.10-0ubuntu1_amd64.deb, or anything like greeter.deb, execute this file. reboot and that's all. This installer package will re-install all greeter files.

share|improve this answer
Look at answer dated Dec 27 at 15:40. The problem was in recent versions of Ubuntu entries placed in the "lightdm.conf" will break lightdm. You have to use the "50-unity-greeter.conf" for scripts to properly execute. I believe this started in version 13.10. – L. D. James Jul 16 '14 at 20:02

Where did you put your file? Likely that file is not in the PATH when lightdm tries to execute the script, so it can't find it. And because a session startup script fails, lightdm tries to switch back to greeter-session, which again tries to load that script and this goes on-and-on. Please use absolute path when you specify the script in lightdm.conf.

If the above didn't solve it, then please paste the contents of the files in the /var/log/lightdm/ directory.

share|improve this answer
Thanks. This is the line: [greeter-setup-script=/etc/lightdm/] As you see it is a full path. Also I typed the full path in the console window to make sure the text was correct. It created the log entry. However, lightdm will have an error and not start. The error differs. This time it says "The system is running in log-graphics mode" Commenting out the configuration will allow lightdm to start as normal. – L. D. James Dec 27 '13 at 14:51
Are you able to use the greeter-setup-script on your system? Which Ubuntu version are you running? – L. D. James Dec 27 '13 at 15:00
@L.D.James I've managed to make it work on nearly all kind of systems from 12.04 to 13.10. So you say, that now the log-file is created, so the script works. Does the script still only contain that date logging into a file, or have you added some more interesting commands to it. Also, have you checked the lightdm log? – falconer Dec 27 '13 at 15:05
Wfalconer. It has always worked on all previous versions. it's only version 13.10 that doesn't work for me. I tested the script's fullpathname from the command line to make sure I had entered it correctly in the conf file. It fails from the lightdm.conf file. The script only updates the log if I type it in manually from the console commandline. The greeter configuration has the same effect on two real machines and one virtualbox installation... all version 13.10. It works fine on every installation before 13.10 for me. – L. D. James Dec 27 '13 at 15:17
@L.D.James Have you checked the lighdtm log files in the /var/log/lightdm directory? Have you tried testing lightdm from terminal with lightdm -d --test-mode ? What are the results? have you tried reinstalling lightdm with sudo apt-get install --reinstall lightdm? – falconer Dec 27 '13 at 15:28

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.