How To Install and Configure KDE Plasma On FreeBSD

How To Install and Configure KDE Plasma On FreeBSD

how-to-install-and-configure-kde-plasma-on-freebsd-cover-photo

Hello everyone, welcome to MusaBase! In today's article, I'll guide you through installing and configuring a desktop environment on a FreeBSD system. In the previous guide, I showed you how to install FreeBSD, and in this follow-up, we'll continue on installing KDE Plasma on that FreeBSD system. In this guide, you'll learn how to:

  • Configure your FreeBSD system to support KDE Plasma
  • Download and install the correct KDE Plasma packages for FreeBSD
  • Set up graphical and input services needed by KDE
  • And finally launching KDE Plasma

By the end of this guide, you'll have a fully functional KDE Plasma desktop running on FreeBSD. So without further ado, let's get started!

freebsd-neofetch-inside-kde-plasma






Prerequisites

This article won't cover the installation of FreeBSD, please visit my FreeBSD Installation guide, and follow all the steps to install a fully functional FreeBSD OS. After completing the installation come back to this guide and continue on installing KDE Plasma.




Step 1: Update & Upgrade System Packages

Before we installing any pacakge or configure services, its important to update our FreeBSD system. Updating ensure our system has the latest list of available pacakges and their correct dependencies. If we continue without updating, then the package installer might try to pull in outdated or missing packages, resulting in failed installs, missing security concerns or depreciated dependencies. And make sure your user has elevated or sudo privileges before doing any super-user task.

  • First we will fetch updates by running:
doas pkg update
# OR
sudo pkg update
  • Next, we will install the new updates with:
doas pkg upgrade
# OR
sudo pkg update



Step 2: Install KDE Plasma and Xorg

Now, we need to install KDE packages, and a X Window System named Xorg. The X Window System also called X11 is the core framework behind building blocks for a GUI on Unix-like operating systems as FreeBSD. It manages windows, graphics output, and user input from devices like a mouse and keyboard. X11 itself is not a full desktop, it just enables applications to draw window and recive input. Desktop environments like KDE, Mate, XFCE or GNOME run on top of X Window System to provide a complete graphical experience.

Install Desktop Environment Packages

  • Run the following command to install KDE plasma with its display manager sddm and Xorg:
doas pkg install --yes kde plasma6-sddm-kcm sddm xorg
# OR
sudo pkg install --yes kde plasma6-sddm-kcm sddm xorg



Step 3: Enable & Start Services

Next, we need to enable and start dbus and SDDM.
D-BUS is an IPC system. It allows software applications and system components to talk to each other, exchange messages and request or provide services.

3.1 Enable & Start dbus Service

  • Run the following commands consecutively to enable & start dbus:
doas sysrc dbus_enable=YES
doas service dbus start

#OR

sudo sysrc dbus_enable=YES
sudo service dbus start

3.2: Enable & Start SDDM Service

SDDM is a graphical login manager that provides a login screen to log into system then it starts graphical desktop session like KDE Plasma. If we install multiple desktop environments then it will lets us pick one from them to start the session.

  • We can enable and start the sddm service with the following commands:
doas sysrc sddm_enable=YES
doas service sddm start

# OR

sudo sysrc sddm_enable=YES
sudo service sddm start



Step 4: Login into KDE Plasma Desktop Environment

After starting the sddm service in the last step, we would have the following login screen:

freebsd-kde-plasma-login-screen
  • Enter your password for your user and press ENTER.
  • The KDE Palsma desktop session will load and after a few seconds, we will have a similar screen on our display:
freebsd-kde-plasma-desktop-screen

Mouse Fix

If you are having problem with mouse not working inside KDE Plasma on FreeBSD, then do the following:

doas pkg install utouch-kmod xf86-input-evdev
  • Next, create or edit /boot/loader.conf.
  • In the open file we need to add two lines.
  • Do the following:
doas nano /boot/loader.conf
  • In the open file add:
utouch_load="YES"
kern.vty=vt
  • Press CTRL + O to save the changes then press ENTER to apply the changes, then press CTRL + X to exit the file.



Afterwards

Well its done, now we have a fully functional KDE Plasma running on our FreeBSD system. I'm planning on making a series about different desktop environments and other stuff that shows the full potential of BSD systems. Stay tuned for next uploads.

If you hit any error or can't start your desktop session, please let me know in the comments. I will be more than happy to help. If you like this article then subscribe to my newsletter for updates.

1o1 out, I'll see you in the next one!

Load comments