How To Install And Configure KDE In FreeBSD?


KDE is among one of the most popular free and opensource desktop environments. It provides various built-in tools. KDE plasma-desktop is extremely lightweight and highly customizable. It comes default in various Linux distributions such as Kubuntu, Manjaro KDE edition, Fedora KDE edition, etc.

There are two ways to install software packages in FreeBSD: pkg and ports collection. Pkg is used to install packages from prebuilt binaries while ports collection is a much more customizable option, a user can decide how a port will be compiled and installed on a system.

This article is on how to install and configure the KDE desktop environment in FreeBSD.

Installing the X windows system

Before you install KDE as your desktop environment, you need to install GUI in your system. X windows system provides a basic framework for a GUI environment, it dictates how to draw or move windows on a display device and interact with mouse and keyboard. It is opensource and generally used on Unix-like systems.

Installing a package in FreeBSD requires root privileges. So if you are not root, first you should run the –

su

Use the following command to install Xorg(X Windows System ) using pkg –

pkg install Xorg

Or install it as a port but before installing from ports collection make sure ports tree is updated, you can use the given command to update ports tree –

portsnap fetch update

And then use the following command to install it –

cd /usr/ports/x11/xorg
make install clean

Now the installation will start it can take up to a few minutes depending upon your system and internet speed.

Configuring the X windows system

The X windows system is now installed on your system. You need to configure a few things so that GUI work correctly on your system. X windows system uses 3D acceleration. In order to benefits from it, you need to add the user who will be running the X windows system to the video or wheel group.

Use the following command to add a user to the video or wheel group –

 pw groupmod video -m lalit || pw groupmod wheel -m lalit

This will add the user lalit to the video or wheel group.

FreeBSD must be configured to set the video output mode. This can be done by editing /boot/loader.conf, use a text editor to edit it –

vi /boot/loader.conf

and add the given line into it –

kern.vty=vt

Install and configure KDE

You can install the KDE by using pkg or ports collection. To install it using pkg use the following command –

pkg install kde5

Or you can install it as a port by using –

cd /usr/ports/x11/KDE5
make install clean

Mount /proc

You need to mount /proc, open the /etc/fstab using a text editor using –

vi /etc/fstab

And add the following line in it –

proc     /proc        procfs      rw 0 0

Configure KDE to start when FreeBSD boots up

To configure it to start automatically when FreeBSD starts, edit the /etc/rc.conf file using a text editor and add the following lines in this configuration file.

vi /etc/rc.conf

Now add the given lines –

dbus_enable="YES"
hald_enable="YES"
kdm5_enable="YES"

Now reboot your computer to start freebsd with the desktop environment.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.