As you might know, Linux is everything about diversity. With the numerous desktop environments available nothing is different in that area. Besides Mate and XFCE, Cinnamon is one of my favorite desktop environments on Linux. Honestly, I can’t really choose. Cinnamon is fast, (not too) fancy, customizable and familiar in some way. Here is how to install Cinnamon on a fresh minimal CentOS 7 installation.
As with my previous post about installing MATE or XFCE: Install MATE or XFCE on CentOS 7, I’ll start wit a minimal installation of CentOS 7. That way, you can be sure that the actions under here should work on a system that has more packages installed.
Installing EPEL and the X window system
Cinnamon can be found in the EPEL-repositories. So before we take any action, we need to install the repository. CentOS contains epel-release which is a packages that will configure your system for EPEL.
[jensd@cen ~]$ sudo yum -y install epel-release ... Complete!
Cinnamon needs a basic X-window system installation in order to have the ability to display something and the dependencies of Cinnamon do not include those packages.
[jensd@cen ~]$ sudo yum -y groupinstall "X Window system" ... Complete!
Install a display manager
After this step, you end up with a system with X-windows installed but no desktop environment or display manager. The next step is to install a display manager. The display manager is responsible for presenting a login prompt and starting the users desktop environment. As with desktop environments there are also a various number of display managers. I chose to continue with LightDM since (what’s in a name) it’s lightweight but alternatives (like GDM) should work fine too.
[jensd@cen ~]$ sudo yum -y install lightdm ... Complete!
Finally, our system is ready to install and start Cinnamon:
[jensd@cen ~]$ sudo yum -y install cinnamon ... Complete!
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:
[jensd@cen ~]$ sudo systemctl isolate graphical.target
After a short time, the GUI should be started and you should be presented with a login screen from LightDM:
After logging in, you should get to the Cinnamon desktop:
In case you wonder how to go back to a console in case something goes wrong, you can use Ctrl + Alt + F2 to open another console session.
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:
[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'
As you can see, the steps are quite similar to the ones for MATE or XFCE but since I like Cinnamon, I wanted to explicitly mention it as well.