Today’s tutorial will check how to install another desktop environment in Nitrux using Distrobox. For this example, we’ll install and use GNOME. Next, let’s clarify that it’s vital to know and understand that the Distrobox developer is considering using Distrobox for this purpose, “an experiment.”
- ⚠️ Important: This tutorial is based on this part of the documentation of Distrobox.
With that said, let’s see how you can add other DEs to Nitrux.
Difficulty: ★★☆☆☆
📜 Table of Contents
First, some context: what is a desktop environment? In computing, a desktop environment (DE) implements the desktop metaphor of a bundle of programs running on top of a computer operating system that shares a standard graphical user interface (GUI), sometimes described as a graphical shell.
Installing a different Desktop Environment
Following up on our tutorial on using Distrobox, we will use the container we created to install GNOME. The following command installs the GNOME meta-package, which includes GNOME Shell and various GNOME apps such as Nautilus, Rhythmbox, Tweaks, and Software.
- 🔰 Information: The meta-package may not include other software or artwork you expect, so install it.
distrobox enter --name debian-stable-distrobox -- sudo apt install gnome
After the command completes the installation, we must create a session file. We tested using an X11 session, as adding the session file to the Wayland sessions directory didn’t work.
- ⚠️ Important: We must move the session file to the sessions directory in the root directory; see XFS Features and Root Immutability in Nitrux.
>> distrobox-gnome.desktop printf "%s\n" \ '[Desktop Entry]' \ 'Name=GNOME Distrobox (X11)' \ 'Comment=This session logs you into GNOME Distrobox (X11)' \ 'Exec=distrobox enter --name debian-stable-distrobox -- /usr/bin/gnome-session' \ 'TryExec=distrobox enter --name debian-stable-distrobox -- /usr/bin/gnome-session' \ 'Type=Application' \ 'DesktopNames=GNOME' \ 'X-GDM-SessionRegisters=true' sudo mv distrobox-gnome.desktop /usr/share/xsessions/
Then, we need to create a script that attempts to correct the permissions of the X11 socket so the container can display graphical output when we log in to the GNOME session.
- ⚠️ Important: We must move the script file to a directory in the root file system; see XFS Features and Root Immutability in Nitrux.
>> fix_tmp.sh printf "%s\n" \ 'chown -f -R $USER:$USER /tmp/.X11-unix' sudo mv fix_tmp.sh /etc/profile.d/
Then, log out and log in to GNOME.

Et voila!. If you’d like to install other desktop environments or window managers, we’ll list some of the meta-packages available in Debian.
- 🔰 Information: If you’re using another Linux distribution for your container, please refer to each distribution’s package search method to find the appropriate name of the meta-packages.
- 🔰 Information: We used Debian 12 for this tutorial; if you want to use a newer version of GNOME (or other desktop environments or window managers), create a container with distributions such as Debian unstable, Fedora Rawhide, Arch Linux, Gentoo, NixOS, Alpine Linux, etc.
### Plasma (Vanilla) distrobox enter --name debian-stable-distrobox -- sudo apt install kde-plasma-desktop ### XFCE distrobox enter --name debian-stable-distrobox -- sudo apt install xfce4 ### LXQt distrobox enter --name debian-stable-distrobox -- sudo apt install lxqt ### MATE distrobox enter --name debian-stable-distrobox -- sudo apt install mate-desktop-environment ### Cinnamon distrobox enter --name debian-stable-distrobox -- sudo apt install cinnamon-desktop-environment ### Enlightment distrobox enter --name debian-stable-distrobox -- sudo apt install enlightment ### i3 distrobox enter --name debian-stable-distrobox -- sudo apt install i3 ### jwm distrobox enter --name debian-stable-distrobox -- sudo apt install jwm
Troubleshooting
Launching applications from the GNOME Overview doesn’t work
For an unknown reason (possibly due to DBus), launching some applications from the Overview doesn’t work out of the box; to alleviate this problem, remove “%U” from “Exec=“ in all launchers in /usr/share/applications within the container. If you’re in the GNOME session, you’re inside the container, and you can enter the command starting with sudo [...]
- 🔰 Information: It’s necessary to edit the desktop launchers every time users install a new application in the container; it’s better to automate this task; this is not a Nitrux bug.
distrobox enter --name debian-stable-distrobox -- sudo find /usr/share/applications -type f -name '*.desktop' -exec sed -i 's/%U//g' {} +
To use GNOME Software or Synaptic (if using the container in this tutorial), refer to the Distrobox tutorial on Issues with PolicyKit Authentication.
That’s it; this concludes today’s tutorial.