1

Recently, I asked this question on how to solve a login loop on Ubuntu 18.04.1.

My problem seems to be specifically associated with the Ubuntu desktop environment, as I am able to successfully login using the LXDE environment. And so I thought if I could completely uninstall and then reinstall that desktop environment, I might be able to login again.

The problem is, I don't know what exactly my desktop-environment is called, or how to completely remove it. It is the default I have used ever since first installing Ubuntu, but, being a very inexperienced Linux user, I don't know what it's actually called.

Could anyone suggest a way to find out what my desktop-environment is, and how to uninstall/reinstall it?

  • echo $DESKTOP_SESSION should display your current environment. For me it responds "Lubuntu" (which makes sense, I'm logged in and using LXQt). The default GUI/Desktop environment installed with Ubuntu 18.04 (or any release) is found in package ubuntu-desktop (Lubuntu with lubuntu-desktop, Xubuntu uses xubuntu-desktop etc) – guiverc Mar 1 at 5:27
  • If you are switching the Desktop Environment from login screen, there must be a list of installed DE. You can determine your default DE from there and reinstall it from another DE or TTY mode using sudo apt install --reinstall <package name> and reboot the system. – Kulfy Mar 1 at 5:41
  • Thanks @guiverc and @Kulfy for your help. I was able to uninstall/reinstall the ubuntu-desktop environment with the command sudo apt install --reinstall ubuntu-desktop, however, it didn't quite solve my problem. What I am wanting is this: how do you completely remove a desktop environment so I can reinstall it later? Giving the previous command only removed about 10 KBs of data -- the desktop environment still seems to be there. Is there a command to entirely delete it? – Kaleb Mar 2 at 18:30
  • I'm not sure what you mean. Most desktops have common components, eg. GNOME uses the GTK+ software stack, as does Unity, MATE, XFCE, LXDE & more. KDE & LXQt & others however used the Qt stack so it's not all. If you had two installed (LXDE (gtk+2) & GNOME (gtk+3)), removing one will naturally leave some components behind as they are used by your other environment, and I'm wondering if this is what you mean. Another thought is apt remove removes the package but leaves the conf files allowing re-install, you could apt purge to remove more, but would need to start again if you re-install – guiverc Mar 3 at 22:02

Your Answer

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

Browse other questions tagged or ask your own question.