(from the Don't you have better things to do? department)
Introduction:
Hi everyone,
Much like many tech sector workers, I spend a lot of time on a Linux desktop lately. I tend to prefer Enterprise or Long Term Support (LTS) editions of Linux - like Ubuntu 22.04 LTS - as opposed to the rolling update Linux versions like Arch. They tend to be very stable, with most bugs ironed out so I can concentrate on the software being tested and not worry about tracking issues in the distribution.
Now - I'm always in search of the perfect desktop experience. I enjoy trying the latest Linux GUIs - Gnome, KDE, Xfce, etc. Ubuntu allows you to install these simultaneously - switching between them when you login. It used to work flawlessly - but since the desktops are becoming more customized - extra steps are needed to switch between them.
This document will contain my notes for switching between Ubuntu Gnome/Gnome, Unity, and Xfce on Ubuntu 22.04 LTS. I'll leave the installing of these into a stock Ubuntu installation as an exercise for the user. (Hint: there are great online guides like this one: How to Switch from GNOME to Unity in Ubuntu 18.04 and 17.10). I'll also assume this is a stock Ubuntu installation with Ubuntu Gnome as the default environment.
Xfce4:
- Switch the Display Manager from GDM to LightDM via the sudo dpkg-reconfigure gdm3 command, and selecting lightdm
- Change LightDM from the Unity greeter to lightdm-gtk greeter by editing /etc/lightdm/lightdm.conf and adding the line greeter-session=lightdm-gtk-greeter, commenting out the line greeter-session=unity-greeter
- If present, you'll have to uninstall gtk3-nocsd - it now interferes with Xfce4 menus, since they're starting to use client side decorations. In Ubuntu the command is sudo apt remove gtk3-nocsd libgtk3-nocsd0
- If you have Unity installed - you may run into an issue where notifications are using the Unity handler instead of the Xfce handler. The easiest way to make sure that Xfce notifications are used is to issue the following command, which just renames the Unity notifier and is easily undone: sudo mv /usr/share/dbus-1/services/org.freedesktop.Notifications.service /usr/share/dbus-1/services/org.freedesktop.Notifications.service.disabled
- You can test the default handler by using the notify-send command. Xfce notifications should be clickable - they close you click on them.
- Once rebooted and logged into Xfce, you'll want to add an additional panel to the top bar - the "Indicator Plugin" - this will make sure Unity style notifications like Skype, Slack, etc. - are displayed in the top bar. I put it next to the Status Tray Plugin for continuity.
- Don't forget to select Xfce Session from the LightDM login screen!
- UPDATE: There may be an issue with XFCE panel notifications and something called ayatana-indicator-application. Uninstalling this via apt made panel notifications work - however it looks like it's installed by default with Xubuntu. Not sure what's going on - but I'm removing it for now. See more information here: https://forum.xfce.org/viewtopic.php?id=16436
Unity:
- Switch the Display Manager from GDM to LightDM via the sudo dpkg-reconfigure gdm3 command, and selecting lightdm
- Make sure LightDM is set to the Unity greeter by editing /etc/lightdm/lightdm.conf and insuring that the line greeter-session=unity-greeter is set.
- Make sure gtk3-nocsd is installed via the command sudo apt install gtk3-nocsd
- Install additional yaru icons with the sudo apt install yaru-theme-unity
- If you have Xfce installed - you may run into an issue where notifications are using the Xfce handler instead of the Unity handler. The easiest way to make sure that Unity notifications are used is to issue the following command, which just renames the Xfce notifier and is easily undone: sudo mv /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service.disabled
- You can test the default handler by using the notify-send command. Unity notifications should not be clickable - they should fade when you hover over them.
- Once rebooted and logged into Unity, you'll want to use Unity Tweak Tool to select the Yaru-dark Theme and Yaru-dark Icon to make it match the latest Unity builds.
- Don't forget to select Unity from the LightDM login screen!
- In addition, current Unity builds are using Nemo instead of Nautilus for default file handling. After locking Nemo to the Unity Launcher, you can switch to Nemo file handling by using the following command: xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
- You can revert back to Nautilus by using the following command: xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
- NOTE: If you've been experimenting with KDE desktops, for some reason, this kind of trashes the ~/.config/gtk-3.0/settings.ini file. This shows up as a messed-up right click Unity Desktop menu, among other things. The quick fix is to edit the ~/.config/gtk-3.0/settings.ini file, and set gtk-menu-images=false. Logging out and logging back in should now have fixed your right click Unity Desktop menu.
- NOTE: Electron apps have issues with Ubuntu AppIndicator Tray Icons. There's a fix here: https://askubuntu.com/questions/1469305/unity-desktop-tray-icons-of-some-apps-not-showing-anymore-ubuntu-22-04
Ubuntu Gnome/Gnome:
- Switch the Display Manager from LightDM to GDM via the sudo dpkg-reconfigure gdm3 command, and selecting gdm3
- Remove the additional yaru icons with the command sudo apt remove yaru-theme-unity
- If you switched to Nemo, be sure to switch back to Nautilus: xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
- Once rebooted, and logged into Ubuntu Gnome or Gnome, you may need to reset your theme from Gnome Tweaks or the Settings control panel.
- Don't forget to select Ubuntu or GNOME from the GDM login screen!