Add a new custom session?

I would like to add a new session to the login screen (the thing where you select "Ubuntu, Ubuntu Classic, etc" to install a new GUI on. How can I do this?


Solution 1:

The list on the logon screen is populated from the desktop files in the folder /usr/share/xsessions

The format of these files are similar - here is the Unity-2D desktop file

[Desktop Entry]
Name=Ubuntu Classic (No effects)
Comment=This session logs you into GNOME with the traditional panel without any 
graphical effect.
Exec=gnome-session --session=2d-gnome
TryExec=gnome-session
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=gnome-session-2.0

All the files are root:root owned.

Creating or deleting desktop files in this folder creates or removes an entry in the drop-down list respectively.

source