29

I recently added Cairo Dock to my GNOME Shell in 11.10. Cairo Dock is GREAT, but I'm left with one little problem that I'd like to fix: after installing Cairo Dock, LightDM includes two extraneous entries to non-working desktops. (The entries to working desktops remain unaffected, so I guess I could just ignore the extraneous entries, but...)

So I'd like to remove/edit the extraneous entries in LightDM. I've looked and looked for discussions on how to do so, but haven't had much luck.

Any suggestions on how to go about editing the login menu in 11.10?

0

3 Answers 3

35

The list of sessions is defined by the .desktop files in the folder /usr/share/xsessions

enter image description here

Lets remove GNOME Classic

In a terminal:

cd /usr/share/xsessions
sudo mv gnome-classic.desktop gnome-classic.desktop.backup

This renames the gnome-classic desktop file

Logout - the new list of sessions will look like:

enter image description here

1
  • Is there a per-user equivalent for /usr/share/xsessions/*.desktop?
    – Fordi
    Apr 4, 2016 at 15:11
23

Your package maintainers will be proud of you if you do it as follows:

sudo mkdir /usr/share/xsessions/hidden
sudo dpkg-divert --rename \
      --divert /usr/share/xsessions/hidden/gnome-classic.desktop \
      --add /usr/share/xsessions/gnome-classic.desktop

What this does is to instruct the package manager to remember a new location for the file. This has several advantages over the other answers:

  • It guarantees a future package install/upgrade won't revert your change
  • It works with other display managers (lxdm for example lists .backup entries)
  • You can revert it easily if you change your mind with:

    sudo dpkg-divert --rename --remove /usr/share/xsessions/gnome-classic.desktop

12
  • Open terminal with Ctrl-Alt-T
  • cd /usr/share/xsessions
  • ls will show you, for example:

    awesome.desktop  gnome-shell.desktop  ubuntu.desktop
    gnome.desktop    ubuntu-2d.desktop
  • Use sudo rm lubuntu.desktop (or whatever) to remove the ones you don't need any longer.

  • Logout and you should see the changes -- if not, reboot and you will see them.
1
  • Thanks! It also worked for my openbox environment that I removed. Jun 10, 2012 at 1:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .