Site icon ★ Semayra Host

Adding a GUI to CentOS 7: A Step-by-Step Guide

Adding a GUI to CentOS 7: A Step-by-Step Guide

Struggling with a command-line-only CentOS server? SEMAYRA-ADMIN is here to help, providing a step-by-step guide to installing a graphical user interface (GUI) such as GNOME, KDE, XFCE, or Mate, making server administration a breeze.

Adding a GUI to CentOS 7: A Step-by-Step Guide 5

CentOS 7 is a robust and versatile open-source server operating system supporting complex websites, containers, and numerous other applications. However, during the, which can be a hindrance for those unfamiliar with Linux. While experienced users may thrive in a text-based environment, a graphical user interface (GUI) can greatly simplify system administration for newcomers to Linux, making it easier to navigate and manage the platform.

If you’re working with a CentOS server that lacks a graphical interface, don’t worry – integrating a guide, I’ll walk you through the steps to install popular desktop environments like GNOME, KDE, XFCE, and Mate, and configure them to support graphical logins, a than you might anticipate.

Adding a GUI to CentOS 7: A Step-by-Step Guide 6

Assumptions

To proceed, it’s assumed that you have a base CentOS 7 installation (without a graphical interface), can log in as the and have a working internet connection. Please be aware that while installing the GNOME environment won’t necessitate a system restart, accessing the graphical login screen will. However, you can still access your GNOME desktop environment without

Installation

To set up the GNOME desktop on CentOS 7, you’ll use the groups feature with the yum command. Prior to installing, it’s a good idea to refresh your system. Run the command sudo yum update to bring all packages up to date. If the update involves a kernel upgrade, you’ll need to restart your system for the changes to become active.

After the update completes, run the following command:

sudo yum -y groups install "GNOME Desktop"

Please be patient as the installation progresses, as the duration will vary based on your system’s processing power and internet speed. Once the installation is complete, you will be returned to your terminal prompt. To finalize the setup, execute the following command:

echo "exec gnome-session" >> ~/.xinitrc

The preceding command specifies the desktop environment that the startx command should launch, step when multiple environments are installed on your system.

Starting GNOME

Prior to configuring the process to run automatically, we’ll first verify that GNOME is functioning correctly. To do this, open a terminal and enter the command startx. This should launch the GNOME desktop environment, which should operate as intended.

Adding a GUI to CentOS 7: A Step-by-Step Guide 7

GUI login

You might find it inconvenient to manually run the startx command each time you access your server. Fortunately, there’s a solution. Simply open a terminal and enter the following command:

systemctl set-default graphical.target

Upon your next system restart, the graphical user interface login page will appear.

Adding a GUI to CentOS 7: A Step-by-Step Guide 8

What about KDE, XFCE, or Mate?

If GNOME isn’t to your liking, you may find KDE a more suitable desktop environment. In that case, you can install it using the following command:

sudo yum -y groups install "KDE Plasma Workspaces"

After the command finishes, notify startx with this command:

echo "exec startkde" >> ~/.xinitrc

Enable XFCE Desktop with These Simple Commands

sudo yum -y groupinstall X11
sudo yum --enablerepo=epel -y groups install "Xfce"
echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc

Get the Mate Desktop Experience: Installation and Enablement Guide

sudo yum --enablerepo=epel -y groups install "MATE Desktop"
echo "exec /usr/bin/mate-session" >> ~/.xinitrc

By setting the default target to graphical with the command systemctl set-default graphical.target, you will be able to choose your preferred graphical user interface from the available options at the login prompt.

Customize Your Server to Fit Your Needs

One of the key benefits of Linux, which I frequently emphasize, is its versatility and customizability. This flexibility extends to adding a graphical user interface (GUI) to the system, allowing users to tailor their experience to their precise needs and preferences.

For those just starting out with Linux administration, a graphical user interface (GUI) is likely the best place to begin. By installing a GUI, you can create a more intuitive and accessible server environment that’s easier to navigate.

Exit mobile version