I have a pretty weird issue here with the Ubuntu session just vanishing from the LightDM session list. I usually use LXDE/Lubuntu as a session and rarely even log into the Unity/Ubuntu desktop, but it used to work flawless, switching back and forth. Now, all of a sudden, the Ubuntu session isn't listed anymore. I seem to be unable, after some extensive research really, to figure it out by myself. Here is relevant information:
1) The Session is there:
$ ls -al /usr/share/xsessions/
total 36
drwxr-xr-x 2 root root 4096 Jan 24 22:04 .
drwxr-xr-x 313 root root 12288 Feb 15 10:50 ..
-rw-r--r-- 1 root root 157 Okt 9 18:02 Lubuntu.desktop
-rw-r--r-- 1 root root 165 Okt 9 18:02 Lubuntu-Netbook.desktop
-rw-r--r-- 1 root root 1507 Feb 27 2016 LXDE.desktop
-rw-r--r-- 1 root root 198 Okt 14 2015 openbox.desktop
-rw-r--r-- 1 root root 204 Aug 22 2016 ubuntu.desktop
$ cat /usr/share/xsessions/ubuntu.desktop
[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=gnome-session --session=ubuntu
TryExec=unity
Icon=
Type=Application
DesktopNames=Unity
X-Ubuntu-Gettext-Domain=gnome-session-3.0
2) LightDM lists all sessions, but the Ubuntu session. The log file even explicitly tells that it is ignoring it (see excerpt of the relevant log file):
$ sudo cat /var/log/lightdm/seat0-greeter.log
[...]
[+0,16s] DEBUG: Loaded session /usr/share/xsessions/openbox.desktop (Openbox, Log in using the Openbox window manager (without a session manager))
[+0,16s] DEBUG: Loaded session /usr/share/xsessions/Lubuntu.desktop (Lubuntu, Lubuntu - Lightweight X11 desktop environment based on LXDE)
[+0,16s] DEBUG: Loaded session /usr/share/xsessions/LXDE.desktop (LXDE, LXDE - Lightweight X11 desktop environment)
[+0,16s] DEBUG: Ignoring session /usr/share/xsessions/ubuntu.desktop
[+0,16s] DEBUG: Loaded session /usr/share/xsessions/Lubuntu-Netbook.desktop (Lubuntu Netbook, Lubuntu Netbook - Lubuntu based session for netbook)
[...]
[+3,00s] DEBUG: session-list.vala:49: Adding session LXDE (LXDE)
[+3,00s] DEBUG: session-list.vala:49: Adding session Lubuntu (Lubuntu)
[+3,00s] DEBUG: session-list.vala:49: Adding session Lubuntu-Netbook (Lubuntu Netbook)
[+3,00s] DEBUG: session-list.vala:49: Adding session openbox (Openbox)
[+3,01s] DEBUG: greeter-list.vala:210: Error registering user list dbus object: An object is already exported for the interface com.canonical.UnityGreeter.List at /list
(nm-applet:3866): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkWidget'
(nm-applet:3866): Gtk-CRITICAL **: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed
[+8,61s] DEBUG: session-list.vala:49: Adding session LXDE (LXDE)
[+8,61s] DEBUG: session-list.vala:49: Adding session Lubuntu (Lubuntu)
[+8,61s] DEBUG: session-list.vala:49: Adding session Lubuntu-Netbook (Lubuntu Netbook)
[+8,61s] DEBUG: session-list.vala:49: Adding session openbox (Openbox)
[+8,61s] DEBUG: greeter-list.vala:210: Error registering user list dbus object: An object is already exported for the interface com.canonical.UnityGreeter.List at /list
[...]
I did, getting desperate somehow, already try to dpkg-reconfigure both lightdm and ubuntu-session. Didn't do anything.
I did see that "DesktopNames=Unity" is not a FreeDesktop standard definition, but i manually downloaded both "ubuntu-session (3.18.1.2-1ubuntu1)" from xenial and "ubuntu-session (3.18.1.2-1ubuntu1.16.04.2)" from xenial-updates, extracted them, looked at /usr/share/xessions/ubuntu.desktop of each of them and they perfectly match up (i assumed some update to it may have messed it).
My system is up-to-date.