I just upgraded to Ubuntu 17.10 from 17.04 (previous version with gnome, not Unity). Now after the updated in the login I have several options

  • Gnome
  • Gnome Classic
  • Ubuntu

etc... how I can remove everything referring to the old GNOME if the session Ubuntu comes with GNOME? I'm currently using only the Ubuntu on Xorg option.

  • 3
    They're executable .desktop files in /usr/share/xsessions, IIRC. Removing the execute permissions or changing the extensions should work. – muru Oct 23 '17 at 14:14
  • 1
    @muru, thank you , I guess we all never learn out :) , yes this is an even easier risk free option, forget what i wrote in my comment above. Don't you want to put that as an answer? – Videonauth Oct 23 '17 at 14:18
  • @Videonauth Don't have anything on hand to test. :/ – muru Oct 23 '17 at 14:21
  • 1
    Just tested it, on my machine renaming was not enough, i had to move the files out or delete them. Just don't touch the symbolic link and its corresponding file – Videonauth Oct 23 '17 at 14:22

Like @muru stated in his comment you have files for all sessions in your /usr/share/xsession directory. Just renaming them sadly does not suffice to make them go away (at least in my case) so remove them or move them somewhere else in case you want to keep them. The directory should be similar to this here just with your choice of what you want to keep (example below taken from my machine).

ls -lah /usr/share/xsessions/
total 20K
drwxr-xr-x   2 root root 4,0K Okt 23 18:11 ./
drwxr-xr-x 347 root root  12K Okt 22 23:46 ../
lrwxrwxrwx   1 root root   18 Okt 13 13:33 gnome.desktop -> gnome-xorg.desktop
-rw-r--r--   1 root root  201 Okt 13 13:33 gnome-xorg.desktop

The symlink in there is your actual choice of desktop environment so only remove the other files and keep the file the symlink is pointing to intact.

if you dont want to remove the files you can as well simply remove all permissions from the files in question (as stated by @PJSingh) by:

# Example line! Change filename accordingly!
sudo chmod a-rwx ubuntu-xorg.desktop

After that you not even see the cogwheel symbol anymore when you log in.

| improve this answer | |
  • I found that removing all permissions for the options I did not want to see, as muru suggested above, works, so you don't need to rename/move/delete the files. In my case, I didn't want to see the ubuntu option, so I did: sudo chmod a-rwx ubuntu-xorg.desktop. Remember, you only need to do this for the files, not the symlinks. – PJ Singh Oct 23 '17 at 23:48
  • @PJSingh Thank you for that input, i will incorporate that into my answer. – Videonauth Oct 23 '17 at 23:50

To remove GNOME Classic from Ubuntu 17.10 or earlier, run this in a terminal:

sudo apt remove gnome-shell-extensions

To remove the vanilla GNOME session, run

sudo apt remove gnome-session
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.