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

I want to disable lightdm from autostart. Currenty, I run service lightdm disable from terminal, then run startx.

update-rc.d doesnt help

share|improve this question
up vote 17 down vote accepted

lightdm is started by Upstart, not SysV Init. So update-rc.d doesn't work.


 echo  "manual" | sudo tee -a /etc/init/lightdm.override
share|improve this answer
thank you! By the way, I found profiles draft for upstart, but it is not implemented so far... – Samat May 21 '12 at 4:25
With this setting I get a black screen when I exit the GUI (after having started it with the startx command). – August Karlstrom Jun 4 '12 at 17:50

Note that the method described above doesn't work anymore since 15.04 and later, since Upstart was replaced by Systemd. As described here, one can now disable lightdm like this:

systemctl disable lightdm
share|improve this answer
Unfortunately, this method doesn't work in 16.04. – Alexander Obersht May 13 at 23:19

If you want to disable lightdm to enable gdm or kdm or any other display manager, enter the following command in the terminal

sudo dpkg-reconfigure lightdm

Then enter on ok and then select from the list your desired display manager.

The same answer with screenshots is given here:

share|improve this answer

I just remove the execution bit on the lightdm binary.

chmod -x /usr/sbin/lightdm

Then to re-enable it:

chmod +x /usr/sbin/lightdm

share|improve this answer
This method doesn't work adequately in 16.04. Although LightDM fails to start, the system also gets stuck at startup splash animation indefinitely. TTYs never become available which makes it impossible to log on locally. – Alexander Obersht May 13 at 23:30
Doing a "sudo systemctl disable lightdm" on a fresh install of Ubuntu Desktop 16.04 AMD64 worked fine for me. – John May 15 at 15:12

This is handled by display-manager... Disable on systemd and you're done.

# systemctl disable display-manager        
Removed symlink /etc/systemd/system/display-manager.service.
share|improve this answer

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.