Unable to start lightdm but can startx

Well, I figured out why according to /var/log/lightdm/lightdm.log:

DEBUG: Failed to load session file /usr/share/xsessions/ubuntu.desktop
DEBUG: Session 1800: Sending SIGTERM
Started seesion 2020 with service 'lightdm', username 'lightdm'
DEBUG: Session 2020 authentication complete with return value 0: Success
DEBUG: Greeter authorized
DEBUG: Logging to /var/log/lightdm/x-0-greeter.log
DEUBG: Failed to load session file /usr/share/xgreeters/default.desktop: No such file or directory
DEBUG: Greeter failed to start
DEBUG: Stopping display

There was something wrong with /etc/lightdm/lightdm.conf. I changed it to:

[SeatDefaults]
user-session=xubuntu
greeter-session=lightdm-gtk-greeter
autologin-user=ubuntu
autologin-timeout=0

This forced it to use xubuntu.desktop and lightdm-gtk-greeter.desktop instead of ubuntu.desktop and default.desktop, which do not exist and will cause failure.


had the same issue - you can create a sym link as temporary workaround:

lrwxrwxrwx   1 root root    27 Nov  3 16:38 .desktop -> lightdm-gtk-greeter.desktop
-rw-r--r--   1 root root   187 Aug 30 20:31 lightdm-gtk-greeter.desktop

this will at least allow lightdm to start.