How To Install And Configure Gnome Desktop in FreeBSD?


FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution. It is used to power modern servers, desktops, and embedded platforms.

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 gnome desktop environment in FreeBSD.

Gnome desktop environment

Gnome is a free and opensource desktop environment for Unix like operating systems. It is a user-friendly desktop environment and comes default in various distributions such as Ubuntu, Debian, Fedora, etc. Gnome 3 is the latest version of gnome.

There are various desktop environments that are the fork of Gnome for example MATE is the fork of gnome 2 and Cinnamon is the fork of gnome 3.

Installing the X windows system

Before you install gnome 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 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 Gnome

You can install the gnome by using pkg or ports collection. To install it using pkg use –

pkg install gnome3

And to install it as a port, use the –

cd /usr/ports/x11/gnome3
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 gnome to start when FreeBSD boots up

To configure it to start automatically when FreeBSD starts, edit the /etc/rc.conf 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"
gdm_enable="YES"
gnome_enable="YES"

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

Ok, that’s all for now. You could also read How to install and configure the KDE desktop environment in FreeBSD.

2 thoughts on “How To Install And Configure Gnome Desktop in FreeBSD?”

  1. You should test before posting.
    pkg install gnome3
    should be:
    pkg install x11/gnome3

    I saw the same error on the FreeBSD site. without the ‘x11/’ the admin will get an error.

    Reply

Leave a Comment

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