How to Install GNOME Desktop Environment on OpenBSD

How to Install GNOME Desktop Environment on OpenBSD

How to Install GNOME Desktop Environment on OpenBSD - Cover Photo

Stability isn't just about a system that doesn't crash; it's about a workflow that feels consistent every time you log in. When you pair the iron-clad security of OpenBSD with the polished, distraction-free environment of GNOME, you create a professional workstation that is built to last.

Welcome back to MusaBase! If you have been following my recent series on BSD systems, you have already mastered the initial installation of OpenBSD: The Most Secure Unix-like OS and explored setting up KDE Plasma as a robust desktop on OpenBSD.

In this follow-up, we will continue the journey by installing and configuring the GNOME desktop on your OpenBSD system. By setting this up alongside KDE Plasma, we will add incredible flexibility to our environment, allowing you to switch between two of the most powerful and feature-rich desktop environments available. In this guide, we will cover how to:

  • Prepare the OpenBSD base system for the GNOME software stack
  • Download and install official GNOME packages via pkg_add
  • Configure the essential system services needed by GNOME
  • And finally, launch your first GNOME session on OpenBSD

By the end of this guide, you will have a fully functional GNOME desktop running alongside KDE Plasma on your OpenBSD system, ready to use whenever you choose. So without further ado, let's get started!







Prerequisites

This guide assumes that you already have a base OpenBSD system installed on your PC. It is essential that your installation includes support for the X Window System, as GNOME requires it to function properly.

If you haven't reached this stage yet, you can follow my step-by-step walkthrough on setting up OpenBSD from scratch, making sure to enable the X Window System during the process. Once your base system is ready, return here to install the GNOME desktop.




Step 1: Preparing OpenBSD System

Before we jump right into installing GNOME, we need to configure our mirror for faster downloads and update the system so we can pull the latest packages and security patches.

1.1: Set Mirror to Closest Server

In OpenBSD, there's no mirrorlist file like in Linux, but we can set a single URL to point to one specific mirror. We changed this mirror URL because the default mirror URL might be the main OpenBSD mirror in the US, which could be slow if you are in another region or country. Choosing a closer mirror reduces latency and speeds up package installs.

  • Open the installurl file in nano like this:
doas nano /etc/installurl
# OR
sudo nano /etc/installurl
  • In the file, replace the default URL with:
https://cloudflare.cdn.openbsd.org/pub/OpenBSD/
# OR
https://fastly.cdn.openbsd.org/pub/OpenBSD/

1.2: Updating System & Packages

Now we will update our OpenBSD system and installed packages. If there are any new kernel updates available, we need to install them and also update packages to the latest versions.

1.2.1: Updating OpenBSD OS

  • Run:
doas syspatch
# OR
sudo syspatch

1.2.2: Updating Installed Packages

  • Next, run:
doas pkg_add -u
# OR
sudo pkg_add -u
  • After updating and upgrading the OS and system packages, reboot your system with doas reboot for changes to take effect.

With these preparations, we can move forward to the next step, which is installing GNOME itself on our OpenBSD system.




Step 2: Install GNOME

We only need to install the GNOME package, which will provide us with all the core components, tools, and services that we usually get on a Linux system for the GNOME desktop environment. To install GNOME, run:

doas pkg_add gnome
# OR
sudo pkg_add gnome

GNOME Extras

If you want the full GNOME Ecosystem, then you can also install the gnome-extra package. To install the full GNOME suite, run:

doas pkg_add gnome-extras



Step 3: Configure OpenBSD Services for GNOME Session

Now, we need to make only a few adjustments to OpenBSD services, like messagebus and display manager (xenodm). And enable some additional services that come with the GNOME package that we installed in the last step.

3.1: Disable XENODM

OpenBSD's default display manager is xenodm, which comes with X11 while installing the OpenBSD system. However, to run GNOME we need GDM, but OpenBSD allows only one graphical login manager at a time. To run a GNOME session, we must disable xenodm.

  • To disable xenodm, simply run:
doas rcctl disable xenodm
# OR
sudo rcctl disable xenodm
Disabling xenodm display manager on OpenBSD to run GNOME session with GDM

3.2: Enable Display & Other Services

  • Run:
doas rcctl enable messagebus gdm multicast avahi_daemon
# OR
sudo rcctl enable messagebus gdm multicast avahi_daemon
Enabling display and network services for GNOME session on OpenBSD

3.3: Reboot

  • Next, simply run the reboot command:
doas reboot
# OR
sudo reboot



Step 4: Start GNOME Session on OpenBSD

  • After rebooting, you should boot into GDM to log into your system:
  • Enter your user's password and after a few seconds, you will be inside GNOME's Desktop Home Screen:
GNOME desktop home screen on OpenBSD after first login

And you are in!



πŸš€ GNOME on OpenBSD is Ready!

Well, now you have a fully functional GNOME desktop session up and running on your system. OpenBSD provides a rock-solid foundation for this environment, and I hope this guide made the installation process easy for you. I will be uploading more guides on other desktop sessions and Wayland compositors, such as Hyprland for OpenBSD, so stay tuned for those updates.

Explore More OpenBSD Desktops

🌟 KDE Plasma: If you want to experience another powerful desktop, follow my guide on installing KDE Plasma on OpenBSD.

XFCE Environment: For those who prefer a lightweight and fast desktop experience, check out how to install XFCE on OpenBSD.

πŸ› ️ Support & Feedback: If you hit any error at any step or have problems while logging into your desktop session, please let me know in the comments below. I will be more than happy to help.

If this guide helped you set up your OpenBSD workstation, subscribe to the MusaBase newsletter for more security-focused BSD tutorials.
101 out, I’ll see you in the next one! πŸš€

Load comments