How to Install Mate Desktop Environment in FreeBSD 11

Mate is a free and open source desktop environment for Linux and Unix-like operating system which is a fork of the now-unmaintained code base of GNOME 2 desktop environment. It is under active development to add support for new technologies while preserving a traditional desktop experience. FreeBSD is a free and open source Unix-like operating system based on BSD systems. Unlike Linux, FreeBSD is developed as an entire operating system from kernel, device drivers to the userland utilities whereas linux is a kernel with device drivers. FreeBSD is heavily used from high end servers, datacenters, office computers to home machines and small devices. In this article, we'll install Mate Desktop Environment in FreeBSD 11 operating system.


Mate desktop environment requires a machine or desktop meeting the following system requirements.

  • At least 1 GB RAM.
  • A machine with FreeBSD 11.0 installed.

Once the above requirements are fulfilled, we'll move ahead for updating our FreeBSD 11 operating system. But if you don't have it installed on your machine, you can follow our article how to install FreeBSD 11.

Updating the System

We'll gonna update our FreeBSD 11 operating system to make sure that all our packages are to the latest release available on the repository. We know that pkg is the default package manager of FreeBSD 11, we'll need to execute the following pkg command in order to update the system using sudo privilege.

% sudo freebsd-update fetch install

% sudo pkg upgrade

Installing Mate Desktop Environment

Once the system updates are installed properly, we'll install Mate desktop environment in our machine. We'll need to install Xorg which is the most popular display server in FreeBSD and its frame buffer video driver package. To do so, we'll need to run the following command in a console or terminal.

% sudo pkg install xorg xf86-video-fbdev

Then, we'll execute the following command to install the Mate desktop packages from the official FreeBSD repository.

% sudo pkg install mate-desktop mate

Enabling Services

After the installation is done, we'll need to enable the services for our Mate desktop environment. To do so, we'll simply need to execute the following command.

% sudo sysrc moused_enable=yes dbus_enable=yes hald_enable=yes

Testing Mate Desktop

In order to check if mate is properly installed on our system, we'll run the following command in a terminal or console. This will run a new Mate session on our desktop instantly.

% mate-session

Installing Slim Display Manager

As Mate doesn't have its own display manager ie the login screen by default in a FreeBSD system. Now, in order to install Slim Display Manager in our FreeBSD machine, we'll need to run the following simple pkg command.

% sudo pkg install slim

Once the installation is done, we'll now need to enable service for the Slim display manager which can be done by the following.

% sudo sysrc slim_enable=yes

Configuring Mate Desktop

If we don't have any user already created besides of root and want to add one with Mate Desktop loaded, we'll need to create an user first by running the following command.

% sudo adduser arun

We'll then assign a password for the user login.

% sudo passwd arun

Then, we'll add the following line of command into the .xinitrc file under the user’s home directory. We'll use our favorite text editor to do so.

% sudo nano /home/arun/.xinitrc

Once the text editor opens, we'll append the file with the following line then save and exit the text editor.

exec mate-session

Next, we'll need to change the ownership of the .xinitrc file to the respective user.

% sudo chown arun:arun /home/arun/.xinitrc

Rebooting Machine

If everything were done as expected, we should be able to get Slim Display Manager asking for user login and after the user login, we should be able to get our Mate desktop environment working as charm. We can simply execute the following command to reboot our FreeBSD machine.

% sudo reboot
FreeBSD 11 Mate Desktop Environment


Similarly, we can install other desktop environments that we like to have in our FreeBSD 11 machine. Its all because of open source making it very easy to port applications made on one platform to another. The desktop environment works awesome on FreeBSD 11 machine enabling us to easily run GUI based applications. We can now install and run other application software that we would like to run in it. Like we installed it, we can install KDE, Cinnamon, Gnome3 and other desktop environments with other display managers. It is pretty easy to install Mate desktop environment in FreeBSD as the packages are already available in the official repository. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy :-)

3 Comments... add one

  1. Hi Arun

    Nice, tutorial. I noticed that you might have the set password command out of order:

    % sudo arun passwd

    It should be "% sudo passwd arun", right?


  2. I recommend not using 'Slim' since it is no longer under development .. and instead to use SDDM (a successor to KDM).

    You only need two steps:
    pkg install x11/sddm

    And then edit /etc/rc.conf


Leave a Comment