How to Install GNOME on FreeBSD (Desktop Setup Guide)
bsd desktop bsd unix freebsd freebsd gui gnome desktop howto linux alternative open source os unix desktop x11Building a desktop on FreeBSD is like putting a luxury interior inside a heavy-duty industrial engine. It gives you the legendary stability of the Berkeley Software Distribution with an interface that is built for high-level productivity and seamless hardware integration.
Welcome back to MusaBase! If you have been following my recent series on BSD systems, you have already mastered the core installation of FreeBSD: The Power to Serve and learned how to set up KDE Plasma as a modern FreeBSD workstation.
In this follow-up, we will continue the journey by installing and configuring the GNOME desktop on your FreeBSD system. By setting this up alongside KDE Plasma, we will add incredible flexibility to our system, allowing you to switch between two of the most powerful desktop environments available. In this guide, we will cover how to:
- Prepare your FreeBSD system for the GNOME software stack
- Download and install the official GNOME packages for FreeBSD
- Configure the essential services and display managers needed by GNOME
- And finally launching your first GNOME session on FreeBSD
By the end of this guide, you will have a fully functional GNOME desktop running alongside KDE Plasma, ready for use whenever you choose. So without further ado, let's get started!
Prerequisites
Before we proceed, please note that this tutorial focuses solely on the desktop environment setup. You should already have a functional base system ready. If you haven't performed the initial setup yet, you can follow my comprehensive walkthrough on setting up FreeBSD from scratch.
Once your base installation is complete and you have your user privileges configured, you can return here to continue with the GNOME desktop session installation.
Step 1: System Level Preparation
Before we jump into the GNOME desktop installation, it is crucial to perform a deep system sync. By refreshing the FreeBSD base and upgrading the package repository, we ensure that every library GNOME depends on is available in its latest, most stable version. Skipping this can lead to broken dependencies or installation failures midway, so I highly recommend starting with a clean, updated slate.
1.1: Patching the FreeBSD Base System
We'll start by checking for any security or kernel patches. FreeBSD provides a dedicated utility called freebsd-update that specifically targets the core OS components without affecting your third-party applications.
- Fetch and apply the latest patches using:
doas freebsd-update fetch
doas freebsd-update install
1.2: Refreshing Local Package Databases
Next, we focus on the applications. Running a package upgrade ensures that all the GNOME-specific binaries we are about to pull will be compatible with your current system libraries.
- Update the repository and upgrade your tools:
doas pkg update && doas pkg upgrade
After these updates are complete, it is a good idea to reboot your machine with doas reboot to ensure the new kernel patches are active before we move to the GNOME installation steps.
Step 2: Install GNOME
Next, we'll install the GNOME package, which contains meta-packages for the GNOME Desktop and Applications.
- Run:
doas pkg install gnome
# OR
sudo pkg install gnome
GNOME Lite
- If you don't want the full GNOME with its extra packages, you can go with the minimal version.
- Run:
doas pkg install gnome-lite
# OR
sudo pkg install gnome-lite
Step 3: Configure Fstab & Services
Next, we need to configure our fstab, rc.conf, ~/.xinitrc files and enable the d-bus service for our GNOME desktop session to run and work without any error.
3.1: Configure Fstab for /proc
- Run:
doas nano /etc/fstab
# OR
sudo nano /etc/fstab
- In the fstab file, add the following line accordingly:
# Device Mountpoint FStype Options Dump Pass#
proc /proc procfs rw 0 0
- After adding proc, press CTRL + O to save the changes, then press ENTER to apply the changes, then press CTRL + X to exit the file.
3.2: Enable D-Bus
- Next, we need to enable D-Bus. If you are installing a desktop environment on FreeBSD for the first time, then this is important. Without dbus, the desktop session won't launch.
- Run:
doas sysrc dbus_enable="YES"
# OR
sudo sysrc dbus_enable="YES"
3.3: Enable GDM (For Single Desktop Session)
This step is optional. If you already have KDE Plasma installed and are using it as your desktop session from my previous guide, then you don't need to do this step. If you are installing only GNOME and intend to use only one desktop environment, then follow this step.
- Run:
doas nano /etc/rc.conf
# OR
sudo nano /etc/rc.conf
- In the rc.conf, add the following line:
gdm_enable="YES"
# OR
sysrc gdm_enable="YES"
- After adding the gdm variable, press CTRL + O to save the changes, then press ENTER to apply the changes, then press CTRL + X to exit the file.
3.4: Add GNOME Session to ~/.xinitrc
- Run:
doas nano ~/.xinitrc
# OR
sudo nano ~/.xinitrc
- In the ~/.xinitrc, add:
exec gnome-session
- After adding gnome-session, press CTRL + O to save the changes, then press ENTER to apply the changes, then press CTRL + X to exit the file.
Step 4: Launch GNOME Session
- Now that everything is set up and services are enabled and configured, let's start the GNOME session.
- Run:
startx
- After a few seconds, you will be on the GNOME home screen:
Multi Desktop Session
If you have followed my Installing KDE Plasma on FreeBSD guide and you also followed this guide to install GNOME, then now you should have two desktop sessions installed. At the SDDM screen, you should have the option for multiple desktop sessions:
- Display managers like SDDM or GDM will automatically detect multiple sessions and list them to choose from at the login screen.
- Simply select Plasma (X11) for the KDE Plasma desktop session or select GNOME on Xorg for the GNOME desktop session, and enter your password to log in.
π Dual Desktop Setup Complete!
Well, now you have a fully functional system with the flexibility to switch between multiple desktop sessions whenever you want. Whether you choose the modern workflow of GNOME or the polished experience of KDE, your FreeBSD workstation is now more versatile than ever. I will be uploading more guides on other desktop environments and Wayland compositors, such as Hyprland, so stay tuned for those updates.
If this guide helped you expand your FreeBSD experience, subscribe to the MusaBase newsletter for more BSD and Linux tutorials.
101 out, I’ll see you in the next one! π


