Home Technical Install GUI for Linux Server and connect by RDP

Install GUI for Linux Server and connect by RDP

Last updated on Aug 10, 2026

For Debian/ Ubuntu:

To install a graphical user interface (GUI) on a Debian/Ubuntu server, please follow the instructions below:

1. Update System

Run package updates to make sure your repositories are fresh:

sudo apt update

sudo apt upgrade -y

2. Install Full GNOME Desktop

Install the core desktop and display manager:

sudo apt install task-gnome-desktop -y

3. Enable and Boot Into GUI:

Set your system to start the graphical display manager automatically on boot:

sudo systemctl set-default graphical.target

Reboot your server to load the login screen:

sudo reboot

4. Enable Remote Desktop

To enable remote desktop access on your server, the easiest and most secure method is installing an Xrdp server, which allows you to connect from any Windows, Mac, or Linux machine using standard Remote Desktop Protocol (RDP) clients.

Install and Start XRDP:

  • Update your package index:

    sudo apt update

  • Install the Xrdp package:

    sudo apt install xrdp -y

  • Verify that the Xrdp service is running successfully:

    sudo systemctl status xrdp

5. Configure Firewall:

If you have enabled firewall on your VPS, you have to configure firewall to allow RDP connection.

  • Allow incoming RDP traffic through your system firewall:

    sudo ufw allow 3389/tcp

  • Reload your firewall settings:

    sudo ufw reload

6. Connect from Your Client Machine:

  • Open the Remote Desktop Connection app on Windows (or an RDP client like Remmina on Linux / Microsoft Remote Desktop on macOS).

  • Type your server's IP address and click connect.

  • Enter your username and password at the Xrdp login prompt.

For Cent OS:

To install a graphical user interface (GUI) on a CentOS server, please follow the instructions below:

1.Check the available package groups:

Check the available package groups by the command:

dnf group list

The output will be in the following format:

Available Environment Groups:
   Server with GUI
   Minimal Install
   Workstation
   Custom Operating System
   Virtualization Host
...

2. Installing GNOME GUI:

Install GNOME GUI by running the following command:

dnf groupinstall "Server with GUI" -y

3. Set GUI as Default:

systemctl set-default graphical

4. Reboot the System:

reboot

Now you can connect to the CentOS server's GUI via the VNC console in the server control panel. You can configure language, keyboard, and user accounts on the initial setup screen.

5. Enable Remote Desktop:

To enable remote desktop access on CentOS after installing the GUI, use the built-in RDP (Remote Desktop Protocol) sharing feature in GNOME

Step-by-Step Enablement:

  • Open Settings from the top-right system menu.

  • Click Systems in the left sidebar. Chose Remote Desktop.

  • On the Desktop Sharing tab, toggle on Desktop Sharing and Remote Control, setup the login details (Username and Password).

  • On the Remote Login tab, toggle on Remote Login (need to unlock first), setup the login details (Username and Password).

  • Configure the Firewall: You must open the default RDP port (3389) to allow external connections:

    sudo firewall-cmd --zone=public --add-service=rdp --permanent

    sudo firewall-cmd --reload

  • You can now connect remotely to your CentOS server using the username and password set up in the previous step.