The desktop environment is a graphical interface that looks like a desktop. After installing it, you will see the system in its usual appearance: with folders, shortcuts, and a menu. This will not delete the terminal — you can still open it and enter commands.
In this article, we will show you how to install the XFCE desktop environment — it is easy to use, does not require many resources, and can be installed on even the weakest server. If you wish, you can install any other desktop environment according to the instructions from the Internet.
1. Connect to the server through your Control Panel or via SSH. To connect through the Control Panel, go to the server control panel and click the monitor icon.
You can find the login and password for connection in your Control Panel in the "Instructions" section.
2. Update the package list with the command:
sudo apt-get update
3. Install the XFCE environment and additional components (panel, file manager, various plugins) with the command:
sudo apt-get install xfce4-session xfce4-goodies
The system will warn you that the installation will take several hundred megabytes of hard disk space.
Confirm the operation with: y
4. Install a tool for initialization of a graphical system (it will launch the XFCE environment).
In some versions of the OS, the system will offer a choice of "gdm3" and "lightdm" tools. Select "lightdm" and press Enter. The system will install it.
In other OS versions, you need to install the tool yourself. Install the tool "xinit" using the command:
sudo apt install xinit
The system will warn you that the installation will take several megabytes of hard disk space.
Confirm the operation with: y
5. The desktop environment will be ready to run.
If you installed "lightdm" at step no. 4 the graphical interface will start after the server reboots. Reboot it using the command:
shutdown -r now
If at step no. 4 you installed xinit, start the graphical interface using the command:
startx
6. If you have installed "Xinit" it will launch XFCE automatically. If you have installed "lightdm" select launching XFCE (Xfce Session) and log in with your username and password.
In some cases, at the first start, the system gives a choice of whether to use the default configuration or create an empty panel. If you are working with XFCE for the first time, select the first option — then the taskbar, clock, pre-configured Start menu, and other important things for work will appear on the desktop. In an empty panel, you will have to configure everything yourself.
That's how the desktop with default configuration looks (little details may vary):
If only folders and widgets are visible on the desktop and there is no panel with the "Applications" button, it’s okay — the panel is simply hidden at the top. Move the slider up to see it.
Everything is ready, use your server with XFCE on it. If you restart the server, it will open the terminal again. You can start the desktop environment using the "startx" command.
1. Connect to the server through your Control Panel or via SSH. To connect through the Control Panel, go to the server control panel and click the monitor icon.
You can find the login and password for connection in your Control Panel in the "Instructions" section.
2. Install EPEL (Extra Packages for Enterprise Linux) — an open and free repository that contains additional software packages for Linux distributions. This includes the XFCE desktop environment packages. Install EPEL with the command:
yum -y install epel-release
3. Install BaseX or X11 (depends on which one is supported by your system) — a system that provides tools and protocols for a graphical interface. It will make windows on the desktop work and help the system control windows by mouse and keyboard. Start the installation with the command:
(for CentOS 7)
yum -y groupinstall x11
(for CentOS 8)
yum -y groupinstall base-x
4. Install the XFCE desktop environment from the EPEL repository with the command:
yum --enablerepo=epel -y groups install "Xfce"
5. Create a script for xinit, a tool for the initialization of a graphical system. You use a script to tell xinit to use the XFCE desktop environment when launching the graphical interface. Create a script with the
command:
echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc
The desktop environment is installed and ready to run. Start it with the command:
startx
Note: If the system gives an error, most likely, you made a mistake when entering the command in step no. 5. Repeat step no. 5 and then start XFCE with the "startx" command.
At the first start, the system will ask you to choose whether you want to use the default configuration or create an empty panel. If you are working with XFCE for the first time, select the first option — then the taskbar, clock, pre-configured Start menu, and other important things for work will appear on the desktop. In an empty panel, you will have to configure everything yourself.
That's how the desktop with default configuration looks:
If only folders and widgets are visible on the desktop and there is no panel with the "Applications" button, it’s okay — the panel is simply hidden at the top. Move the slider up to see it.
Everything is ready to go. Use your server with XFCE on it.
If you restart the server, it will open the terminal again. You can start the desktop environment using the "startx" command.
1. Connect to the server through your Control Panel or via SSH. To connect through the Control Panel, go to the server control panel and click the monitor icon.
You can find the login and password for connection in your Control Panel in the "Instructions" section.
2. Install XFCE with the command:
apt-get install xfce4
The system will warn you that the installation will take several hundred megabytes of hard disk space.
Confirm the operation with: y
3. Install additional components for XFCE (panel, file manager, and various plugins) with the command:
apt-get install xfce4-goodies
The system will warn you that the installation will take several megabytes of hard disk space.
Confirm the operation with: y
After installation, the graphical environment will be ready to run. Start XFCE with the command:
startx
At the first start, the system will ask you to choose whether you want to use the default configuration or create an empty panel. If you are working with XFCE for the first time, select the first option — then the taskbar, clock, pre-configured Start menu, and other important things for work will appear on the desktop. In an empty panel, you will have to configure everything yourself.
That's how the desktop with default configuration looks:
Everything is ready, use your server with XFCE on it. If you restart the server, it will open the terminal again. You can start the desktop environment using the "startx" command.
Click on "Applications" in the upper-left corner and select "Terminal Emulator". The terminal will open.
Press Ctrl + Alt + F1 — you will be returned to the terminal without a graphical interface. When you restart the server, the desktop will open again.
Click on the "Applications" button in the upper-left corner of the screen. Select "Log Out" in the drop-down menu.
Select "Log Out" in the pop-up window.
You will be returned to the terminal. You can start XFCE again with the "startx" command.
Was this article helpful?
Enhance your online presence with our virtual and dedicated servers.