Running Xfce on CentOS

Last month the CentOS project finally released CentOS 7.3. By default, CentOS ships with GNOME 3 as the primary desktop environment. However I tend to prefer lightweight alternatives like Xfce.

Installing Xfce

I started out with a minimal CentOS install that only used the @core package group. This system was installed using the kickstart script from a previous post.

Xfce is packaged as part of the EPEL project, therefore the first thing to do was install the EPEL repository configuration:

yum install

The Xfce package group can then be installed, along with the X Window system package group:

yum groupinstall xfce "X Window system"

274 packages and 144MB later Xfce was installed. The last thing to do was tell systemd to run a graphical environment and enable it to run at boot:

systemctl set-default
systemctl isolate

Note: if you only have a root account, it's a good idea to setup a separate user instead of logging into Xfce as root.

VirtualBox guest additions

If you're running CentOS as a Virtual Machine, it's a good idea to install the guest additions software. To start the installation process, select "Device -> Insert Guest Additions CD image" from the menu:

Screenshot showing the Guest Additions menu item.

The guest additions need to be compiled against the Kernel. This should be straightforward, however headers and a suitable compiler need to be installed:

yum groupinstall "Development Tools"
yum install kernel-devel-$(uname -r)
yum install dkms

Note: dkms is not required, but it will save having to recompile after kernel updates.

Once development tools have been installed the ISO can be mounted:

mount -o ro /dev/cdrom /mnt

From here it's just a case of running the installation script:


Note: at this point you may need to restart the system before logging in.


Once Xfce is installed, the system should boot into a gdm login screen:

Screenshot of a gdm login screen.

From here you should be able to log in and start using Xfce. If you're new to Xfce, below are a few links to get you started: