How to Install GNOME Desktop Environment on OpenBSD

How to Install GNOME Desktop Environment on OpenBSD

how-to-install-gnome-desktop-environment-on-openbsd-system-cover-photo

Hi all, welcome back to MusaBase! If you've been following my recent guides for BSD systems, then you've already learned how to install OpenBSD and then KDE Plasma as your first desktop environment. In this follow-up, we'll continue the journey by installing and configuring GNOME on OpenBSD system alongside KDE Plasma. We'll add flexibility to our OpenBSD system to switch between two powerful desktop environments. In this guide, we'll learn how to:

  • Prepare OpenBSD system for GNOME packages
  • Download and install Gnome package for OpenBSD
  • Configure services needed by GNOME
  • And finally launcing GNOME

By the end of this guide, you'll 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!

neofetch-in-gnome-desktop-environment-on-openbsd-system






Prerequisites

This guide assumes that you have already OpenBSD installed on your PC and your OpenBSD does support X Window System. If you haven't installed OpenBSD yet, then please visit my OpenBSD Installation Guide and install it. Just don't forget to leave the support for X Window System enable while installing the OS. When you are done with the installation then come back to this tutorial and continue.




Step 1: Preaparing OpenBSD System

Before we jump right into installing KDE Plasma, we need to configure our mirror for faster downloads and update the system so we can pull 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 antoher region or country. Choosing a closer mirror reduces latency and speeds up pacakge 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 pacakges. If there are any new Kernel update available we need to install it and also update packages to 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 OS and system packages, reboot your system with doas reboot for changes to take effect.

With these preparation we can move forward onto next step. Which is installing KDE Plasma itself on our OpenBSD system.




Step 2: Install GNOME

We only need to install GNOME package, this package will provide us with all the core components, tools and services that we get usaully on a Linux system for 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 gnome-extra package. To install 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 adjustment 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 OpenBSD system. However to run GNOME we need GDM, but OpenBSD allows only one graphical login manager at a time. To run GNOME session we must disable xenodm.

  • To disable xenodm, simply run:
doas rcctl disable xenodm
# OR
sudo rcctl disable xenodm
openbsd-disabling-xenodm-for-gnome-session-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
openbsd-enabling-display-and-network-services-for-gnome-session

3.3: Reboot

  • Next, simply just 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 Dektop Home Screen:
gnome-desktop-home-screen-on-openbsd



Afterwards

Well now you have GNOME Desktop Session fully functional up and running on your system. I'll upload guides on other desktop sessions or wayland compositor like Hyprland installation for OpenBSD as well, stay tuned for that.

If you hit any error at any step or having problem while logging into desktop session, please let me know in the comments, I'll be more than happy to help.

This is it, 1O1 out, I'll see you in the next one!

Load comments