Sunday, September 25, 2011

Setting Gnome Shell as the default desktop session for Oneiric

LightDM apparently doesn't yet provide a UI for setting the default desktop session. At least it's not available in Oneiric.

Changing the default session requires running lightdm-set-defaults from terminal. After installing Gnome Shell from the repositories, it's a simple command away from setting it as your default desktop:

~$ sudo /usr/lib/lightdm/lightdm-set-defaults --session gnome

Once successfully run, Gnome Shell should be the default selection on your next boot. To change back to Unity simply re-run the command, replacing gnome with ubuntu.

~$ sudo /usr/lib/lightdm/lightdm-set-defaults --session ubuntu

That's it.

6 comments:

  1. So how do I make it set the default session for Ubuntu 2D? I've tried variations of the command ubuntu2d, ubuntu 2d, Ubuntu 2D, and finally Ubuntu2D.

    Thanks

    ReplyDelete
  2. Do you have to reboot after doing this? I'm trying with gnome and gnome shell but it keeps starting with unity

    ReplyDelete
  3. @Bucknasty Try "ubuntu-2d" , or if that doesn't work, edit /etc/lightdm/lightdm.conf and edit the user-session line: user-session=ubuntu-2d (info here: http://askubuntu.com/questions/62833/how-do-i-change-the-default-session-for-lightdm-when-using-auto-logins)

    ReplyDelete
  4. @Bucknasty

    What wayfarer_boy said. use "ubuntu-2d" if you want Unity 2D as default session.

    @JJ Yes, it only takes effect on you next boot. Just a simple logout doesn't work at this time.

    ReplyDelete
  5. Hi, I did this
    sudo /usr/lib/lightdm/lightdm-set-defaults --session gnome
    but when I restart it automatically logs in a sort of "gnome-sell"... I just see the dektop and the nautilus menu bar on top. Nothing else. Please help...

    ReplyDelete
  6. @luca Yes it seems that Gnome Shell doesn't work well with auto-login. Press Ctrl+Alt+Del then click logout. Re-login and things should be ok.

    I haven't tested with manual login but I'm assuming that works fine.

    ReplyDelete