How To Install And Configure Xfce In FreeBSD?


Xfce is a free and opensource desktop environment that aims to be lightweight, fast, and low on system resources while still being visually appealing and easy to use.

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

Installing the X windows system

Before you install Xfce 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

How to install Xfce

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

pkg install xfce

And to install it as a port, use the –

cd /usr/ports/x11-wm/xfce4
make install clean

Configure Xfce

Xfce doesn’t provide its own login manager so it starts a little bit different from KDE or Gnome. To be able to start Xfce from the command line first add the given entry to  ~/.xinitrc. Execute the following in your terminal –

 echo "exec /usr/local/bin/startxfce4 --with-ck-launch" > ~/.xinitrc

Start Xfce

Xfce will not start automatically when the system boots up. You can start it by launching x windows system from the terminal by using –

startx

Ok, that’s all for now. You can also visit the how to install and configure gnome in freebsd or how to install and configure KDE in freebsd. If you have something to say on this topic then write us in the comments below.

1 thought on “How To Install And Configure Xfce In FreeBSD?”

  1. FreeBSD 13.1 rocks big time. At first I was a bit scare, because, I was not used to the command line, but I’ve been playing around with it, for the passed two weeks and feel more confident and quite happy, that I’am now getting the hang of it. FreeBSD is so much powerful than any other OS out there.

    Reply

Leave a Comment

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