How to run greeter/login script with lightdm
Solution 1
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!
Solution 2
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.
Related videos on Youtube
Apologician
I'm an IT professional. An Internet pioneer where I was one of the first provider of ISP services (Apollo III Communications). People often ask about my signature. I sign my messages so that any question I ask or participate in can easily be found. Back in the 80's when I was starting out I hoped to never ask the same question twice. So I use text in my signature to find past discussions to give support to users. My email address is the oldest one on the Internet. -- L. James -- L. D. James [email protected] www.apollo3.com/~ljames
Updated on September 18, 2022Comments
-
Apologician over 1 year
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.
-
Apologician over 10 yearsThanks. 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.
-
Apologician over 10 yearsAre you able to use the greeter-setup-script on your system? Which Ubuntu version are you running?
-
falconer over 10 years@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?
-
Apologician over 10 yearsWfalconer. 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.
-
falconer over 10 years@L.D.James Have you checked the lighdtm log files in the
/var/log/lightdm
directory? Have you tried testing lightdm from terminal withlightdm -d --test-mode
? What are the results? have you tried reinstalling lightdm withsudo apt-get install --reinstall lightdm
? -
Apologician over 10 yearsThanks. While searching all the installations, trying to figure out the best way to describe the problem to you, I have realized a change. This is the gist of my question. What was different. It appears that the lightdm.conf (any parameter) will break lightdm for 13.10... unlike previous versions. I testing adding the script to the lightdm.conf.d directory and it executed and did not break lightdm.
-
falconer over 10 years@L.D.James I've just installed lightdm to a Lubuntu 13.10 and there is no such problem what you mention.
-
Apologician almost 10 yearsLook 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.