In this how to install Mate on FreeBSD I’m not going to repeat the same guides you can read elsewhere. If you desire to use FreeBSD as a daily driver desktop, I do encourage you to read and follow the guides from this other guy. The guide you are currently reading can be considered the first block on your journey to a full FreeBSD desktop computer.
A computing device with a screen with FreeBSD 12-13 version installed on it.
Some previous Linux/FreeBSD/UNIX knowledge on the CLI.
Step 1.- Install X11
We will install X11 first by issuing the following command.
sudo pkg install -y xorg
With X11 installed on this FreeBSD box we can move to installing the desktop itself.
Step 2.- Install the Mate Desktop on FreeBSD
In order to install Mate Desktop on FreeBSD we will issue this next command.
sudo pkg install -y mate drm-kmod slim
With the X11 server and driver and the desktop and login programs installed we can now move on to the next step.
Step 3.- Enabling services
These three below are necessary services to boot this Mate desktop box on FreeBSD and have a successful desktop experience.
sudo sysrc dbus_enable="YES"
sudo sysrc slim_enable="YES
sudo sysrc kld_list="i915kms"
Tip: You may not be using an Intel graphics device and may be using and AMD one or an NVIDIA dedicated graphics card. Use this guide for those and make the necessary adjustments:
Step 4.- Set the xinitrc file
To boot our system and be welcomed by a login prompt as with any other device equipped with a regular desktop experience create the ‘.xinitrc’ file in your user’s home directory.
sudo touch .xinitrc
Inside the file you will have to include the directive “exec mate-session”. To achieve that you can use this next command.
sudo echo "exec mate-session" >> .xinitrc
You may have struggled using other guides to install Mate on FreeBSD 12 or 13 version. The most probable reason is many lack the drm-kmod package. Getting a nice desktop on FreeBSD is not that difficult, and I hope this helps achieve that goal to anyone reading this. Adjust your desktop package to the one you like, as KDE, LXDE, Gnome, etc. Enjoy!