Install MATE or XFCE on CentOS 7

Which desktop environment you prefer is very personal. Each of them has its advantages and, unfortunately, also its disadvantages.

Recently, I started to like MATE since it’s lightweight and customizable in a way I personally like. Before, I was a fan of XFCE for similar reasons but somehow I got a little tired and irritated of it’s shortcomings.

With the new release of CentOS 7, it’s interesting to look how to install any of those  on top of a minimal install since this means it can be installed on top of almost every type of installation in regards to package selection and dependencies.

Installation is quite simple since both Desktop environments are available in the EPEL repository. Basically, it comes down to installing the repo, installing the X-window system and then install the desktop environment of your choice. If you want to, you can install multiple environments to decide which one you like less/more.

Installing EPEL and the X window system:

Both XFCE and MATE can be found in the EPEL-repositories. So before we take any action, we need to install the repository.  More information and a recent download-link can be found here: http://fedora.cu.be/epel/7/x86_64/repoview/epel-release.html

To install the repo with the link as it was at the time of writing:

1 [ jensd@cen ~]$ sudo yum install epel-release

Before we start, we need to install the X-window system. These packages do not require EPEL. Of course it doesn’t bother if it’s already installed.

1 [ jensd@cen ~]$ sudo yum groupinstall "X Window system"

Now you have a minimally installed X without any desktop environment so let’s change that.

Install MATE

Since we already installed the EPEL-repo, the only thing that’s left to do is a groupinstall for MATE.

To first have a look at what exactly will be installed, we can execute yum with the groupinfo-command:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [ jensd@cen ~]$ yum groupinfo "MATE Desktop" Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: be.mirror.eurid.eu * epel: be.mirror.eurid.eu * extras: be.mirror.eurid.eu * updates: be.mirror.eurid.eu Environment Group: MATE Desktop Environment-Id: mate-desktop-environment Description: MATE Desktop is based on GNOME 2 and provides a powerful graphical user interface for users who seek a simple easy to use traditional desktop interface. Mandatory Groups: +admin-tools +base-x =core =dial-up =fonts =guest-desktop-agents +hardware-support =input-methods =mate-desktop =multimedia +printing +standard Optional Groups: +3d-printing +libreoffice

When you are happy with the result, you can install the group as follows:

1 [ jensd@cen ~]$ sudo yum groupinstall "MATE Desktop"

Install XFCE

Similar to installing MATE, we can install XFCE:

1 [ jensd@cen ~]$ sudo yum groupinstall xfce

Starting the graphical environment

After the installation of one or more desktop environments, you need to tell your system to start the graphical components (X window-system and display manager). Since CentOS version 7, this is done by systemd and it’s targets. In the past, this was done by switching runlevels. The target for a graphical system is conveniently called graphical.target and is similar to what runlevel 5 was in the past.

To switch to graphical target, do the following:

1 [ jensd@cen ~]$ sudo systemctl isolate graphical.target

This should start all what is needed in order to present you with a GUI on the system. Depending on which display manager was installed (lightdm for MATE and gdm for XFCE), you are presented with one of the following login screens:

GDM:

LightDM:

After login, you should get your familiar desktop and you can start working with the GUI:

MATE:

XFCE:

Start the GUI on boot

After a reboot, the system will start with it’s default target (multi-user) so in order to make the change permanent and always start your system with a GUI, you can change the default target to the graphical one:

1 2 3 [ jensd@cen ~]$ sudo systemctl set-default graphical.target rm '/etc/systemd/system/default.target' ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'

Change the default display manager

When you installed both XFCE and MATE on one system, you can choose which one of them to start for your desktop session on the login screen.

For GDM, this can be done here:

For LightDM, this can be done here:

Depending on which one of them you installed first, your default display manager (lightdm or gdm) is started with the graphical.target. This basically means that you will be presented with a different login screen and some other options.

To see which display manager is started with the grahpical target or the system, do the following:

1 [ jensd@cen ~]$ ls -l /etc/systemd/system/display-manager.service

When lightdm is the default one, you should get something like this:

1 2 [ jensd@cen ~]$ ls -l /etc/systemd/system/display-manager.service lrwxrwxrwx. 1 root root 39 Jul 22 10:30 /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/lightdm.service

When gdm is the default one, it should look like this:

1 2 [ jensd@cen ~]$ ls -l /etc/systemd/system/display-manager.service lrwxrwxrwx. 1 root root 35 Jul 22 10:32 /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/gdm.service

To change from one to another, simply disable the current default and enable the one you would like to set as the new default. With systemd, you can do that with the following commands:

1 2 3 4 [ jensd@cen ~]$ sudo systemctl disable gdm && sudo systemctl enable lightdm [sudo] password for jensd: rm '/etc/systemd/system/display-manager.service' ln -s '/usr/lib/systemd/system/lightdm.service' '/etc/systemd/system/display-manager.service'

To reload the graphical target and activate your changes:

1 [ jensd@cen ~]$ sudo systemctl isolate graphical.target

That should be all you need to get going with XFCE or MATE on a fresh CentOS 7 system. As with most of the CEntOS-related stuff, this should work on RHEL 7 as well.

Recommended Posts

Install MATE or XFCE on CentOS 7
Install Docker on Centos7
install LNMP on centos7.4
Install Java on Centos 7
Nodejs install on centos7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
Maven install on centos7
Install MongoDB on CentOS 7
Install Surelog on CentOS8
Openjdk install on centos7
Install Jenkins on centos7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
install Docker on centos6.5
install oracle on centos
Install Elasticsearch 6 on centos7
Install RabbitMQ on CentOS7
Install ElasticSearch 7.x on CentOS 7
Centos8 install xfce graphical interface
Install MySQL 8.0.16 on Linux Centos
Install docker transfer on Centos7
Install docker on Centos system
install EPEL repo on centos
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Centos install Golang 1.9 or above
Install Nginx server on CentOS 7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
Install JDK8 in rpm on CentOS7
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
Install MySQL on Linux CentOS7 (Windows)
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
Centos yum install mysql5.6 or above
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
​Install Oracle database on CentOS Linux
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8