Ubuntu – Switch Desktop Environment from Command Line

desktop-environmentsgnomesshvncxfce

I have Ubuntu Gnome installed on a headless box. I use SSH or VNC to connect to it. I'm trying to switch to XFCE and I've got it installed, but the tutorials say to log out, and select the desktop environment from the login screen. Problem is, over VNC I can't do this.

How do I set the default desktop environment from the command line or a config file?

Best Answer

https://wiki.ubuntu.com/LightDM#Change_the_Default_Session

From that link you can set default session from the terminal.

Related Question