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

update-rc.d doesnt help

5 Answers 5


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:

16.04 upward

systemctl disable lightdm.service

15.04, 15.10

systemctl disable lightdm
  • Unfortunately, this method doesn't work in 16.04. May 13, 2016 at 23:19
  • @AlexanderObersht you're right, see correction. Aug 16, 2016 at 16:26
  • mind that if you do this the system may not boot afterwards (ending up in this situation). In that case use the command provided by Nirmik here to reconfigure a display manager
    – glS
    Mar 1, 2018 at 14:53
  • @glS No, this won't prevent the system from booting. It just disables the display manager ;) so you find a perfectly running shell at ctrl+alt+f2. Here, you can login, and do sudo service lightdm start to start lightdm once, or systemctl enable lightdm.service to have it start automatically again... Mar 2, 2018 at 15:36

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


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

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: Reset to Default Unity Login


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

  • 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. May 13, 2016 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, 2016 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.

You must log in to answer this question.

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