Lightdm not starting on boot

Run a terminal and enter cat /etc/X11/default-display-manager. Probably says lightdm if you recently uninstalled GDM. /etc/init/lightdm.conf doesn't accept lightdm as a setting - however, /usr/bin/lightdm or /usr/sbin/lightdm work. So open /etc/X11/default-display-manager in your favorite text editor and replace whatever is there with the following line:

/usr/bin/lightdm

or

/usr/sbin/lightdm

Reboot and lightdm should start and bring you to the logon screen as usual.


My solution was to run:

rm /etc/systemd/system/default.target
systemctl set-default graphical.target

This will replace the default target file, which in my case must have prevented systemd from reaching the graphical target, with a symlink to the graphical target. After this, lightdm (and gdm when selected with dpkg-reconfigure) starts automatically.

/etc/X11/default-display-manager was already set to the correct value so this appears to be a different root cause from OP's.

More information on systemd targets here.


It happens for me when removing gnome apps including gdm,and moving to kde.

I fixed it by running:

sudo dpkg-reconfigure lightdm

and choosing kdm as default instead of lightdm