FreeBSD 12.1 with minimal KDE Plasma 5 Desktop Environment

FreeBSD had a safe home in my 12-year old Dell XPS M1330 laptop until recently. Xfce was the Desktop Environment of my choice on FreeBSD. A few days ago I turned the laptop into a database server for my experiments. So, it now runs openSUSE Leap 15.1 with MariaDB. Soon, I will have PostgreSQL and MongoDB too on it. I gave FreeBSD a new home - a virtual machine in my i7-4770 workstation.

THE PROCESS

  • Install FreeBSD:

Downloaded FreeBSD-12.1-RELEASE-amd64-bootonly.iso from the official repository. Followed the very intuitive installer and got FreeBSD installed as a virtual machine.

  • Install xorg:
# pkg install xorg

# pkg install plasma5-plasma

Now, add the following lines to /etc/rc.conf:

dbus_enable="YES"
hald_enable="YES"

  • This installation of KDE Plasma 5 is so minimal that even konsole, the terminal emulator, needs to be installed explicitly:
# pkg install konsole

  • Install VirtualBox Guest Additions:
# pkg install virtualbox-ose-additions

  • Add the following lines into /etc/rc.conf:
vboxguest_enable="YES"
vboxservice_enable="YES"

  • Now it is time for configuring how to start KDE Plasma 5. There are two ways of doing this - startx or sddm. The former is a terminal command while the latter is a Display Manager. KDE chose sddm as a successor of KDM. I did not install SDDM for unknown reasons (or because I am too lazy). So, add the following line into ~/.xinitrc:
exec ck-launch-session startplasma-x11

Now, if you add this line as root, you will have KDE Plasma 5 waking up with startx only if you login as root. For the above step to work for any other user, perform the above step once logged in as the other user.

CONCLUSION

The above steps gave me a FreeBSD 12.1 VirtualBox virtual machine with minimal KDE Plasma 5 desktop. The whole setup works well.

REFERENCES