Introduction
GNOME is a popular and free desktop environment designed for UNIX-like systems. If you're running a clean vStack Cloud server and want to set up a graphical interface, installing GNOME on Ubuntu 22.04 is a great option. This guide will walk you through the entire process, from installation to connecting via xRDP and VNC, so you can manage your server with ease.
Preparing for installation
To get started, make sure you're using Ubuntu 22.04, as it is compatible with the GNOME desktop environment. Initial system setup as in our instruction.
MobaXterm – an excellent tool for managing various types of connections to your server. It supports SSH, RDP, and VNC connections, which are essential for this guide. If you don't have it installed, download and install it on your local machine for seamless remote access to your server.
Updating packages
Before starting the installation of GNOME, it's crucial to update your system to ensure you have the latest software and security patches. Run the following commands to update your package list and upgrade installed packages:
apt update && apt upgrade -y
Installing GNOME on Ubuntu
GNOME can be installed on Ubuntu through the ubuntu-gnome-desktop package. It requires at least 2.5 GB of free disk space. To install the GNOME desktop environment, run the following command:
apt install ubuntu-gnome-desktop -y
The installation process will begin, and depending on your server's connection speed, it might take a few minutes to complete. Once finished, you can proceed to configure remote access.
Installing xRDP
To access your GNOME desktop remotely, you'll need to install xRDP, a tool that allows remote desktop connections via the RDP (Remote Desktop Protocol). To install xRDP on your Ubuntu server, run the following command:
sudo apt install xrdp -y
This will download and install the xRDP package. Once installed, you need to start and enable the xRDP service so that it runs automatically at boot:
sudo systemctl enable --now xrdp
Next, you should check the status of the xRDP service to ensure it's running properly:
sudo systemctl status xrdp
If the service is active and running, you can proceed to configure the system for remote login. In some cases, you may not be able to log in using your regular user account. To fix this, you need to set a password for the root user by running:
sudo passwd root
After setting the root password, restart the xRDP service to apply any changes:
sudo systemctl restart xrdp
Now, your Ubuntu system is ready for remote desktop access. You can connect using the Remote Desktop Connection tool on Windows or any RDP-compatible client on other systems. To do so, simply enter the server's IP address and log in with your user credentials or the root account, depending on your configuration.
Configuring the Desktop Environment
Let's set up the desktop as follows, start the installation as in Screen 1.

Screen 1 – Starting the Desktop Installation: Begin by configuring the desktop environment through the provided setup wizard. Choose the appropriate keyboard layout and other settings as shown in the following screens.
If you can't connect via xRDP. You must set the password for the root user by logging in through the root user and use the command:
passwd
Let's choose the keyboard layout as in Screen 2:

Screen 2 – Keyboard Layout Selection: Choose your preferred keyboard layout during the installation process.
Let's turn off the agreement with the transfer of data to applications requiring geolocation, as shown in Screen 3:

Screen 3 – Geolocation Agreement: It's recommended to disable the geolocation sharing, as shown in Screen 3, for privacy reasons.
The result is about setting up the working environment as shown in Screen 4, the result is successful:

Screen 4 – Successful Installation: After completing the setup, your system should be ready with the GNOME desktop environment. The result will look like Screen 4.
Verifying System Information
To check your system’s information, including the operating system and version, use the following command:
cat /etc/os-release
This will display details about your Ubuntu installation, ensuring everything is in order.
According to Screen 5:

Installing and Launching Firefox
Once GNOME is installed, you can start using the desktop environment to install applications. For example, to install Firefox, run the following:
apt install firefox
Once the installation is complete, you can launch Firefox with the command:
firefox
The result is shown in Figure 6:

Screen 6 – Launching the Browser: The result will display the Firefox browser running on your newly installed GNOME desktop.
Configuring VNC
To set up VNC access, follow the instructions in our guide - "How to Establish VNC Connection Over SSH tunnel in Ubuntu 20.04".
Using MobaXterm, you can configure a session for remote access by entering your server’s IP address and port number (assigned by the vncserver).

Screen 7 – VNC Session Setup: Enter the required details in MobaXterm and click “OK” to start the session.
The result of connecting using VNC is shown in Screen 8:
Screen 8 – VNC Connection Result: Once connected, you will see the GNOME desktop environment displayed via VNC.
Conclusion
In this guide, we’ve covered the following:
- Installing GNOME on Ubuntu 22.04
- Connecting via xRDP for remote desktop access
- Setting up VNC using MobaXterm
Of the two options, xRDP is the most efficient method for connecting to your server. It allows for launching a terminal session directly on the remote desktop, which is not possible with VNC.
FAQ
- Can I install GNOME on other versions of Ubuntu?
Yes, GNOME is compatible with most versions of Ubuntu. However, for the best performance and compatibility, we recommend using Ubuntu 22.04. - What do I do if I can’t log in via xRDP?
Make sure the root password is set up and that the xRDP service is running. You can restart xRDP with the command:
sudo systemctl restart xrdp
- Can I use other remote desktop clients instead of MobaXterm?
Yes, you can use any RDP client (e.g., Windows’ built-in Remote Desktop Connection or other third-party tools) for connecting via xRDP. For VNC, ensure that your VNC client is properly configured. - Is there a way to uninstall GNOME if I no longer need it?
Yes, to uninstall GNOME, run:
sudo apt remove ubuntu-gnome-desktop --purge
sudo apt autoremove
This will remove GNOME and any unnecessary dependencies.