4

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.

Example:

greeter-setup-script=/etc/lightdm/test.sh

The text.sh file is simply a shell command to indicate it ran:

test.sh:
#!/bin/bash
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.

3 Answers 3

3

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:

/etc/lightdm/lightdm.conf.d/50-unity-greeter.conf

This works!

1

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.

1
  • 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. Jul 16, 2014 at 20:02
0

Where did you put your test.sh 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.

7
  • Thanks. This is the line: [greeter-setup-script=/etc/lightdm/test.sh] 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. Dec 27, 2013 at 14:51
  • Are you able to use the greeter-setup-script on your system? Which Ubuntu version are you running? Dec 27, 2013 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, 2013 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. Dec 27, 2013 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, 2013 at 15:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .