> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gcore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install GUI (desktop environment) on Ubuntu, CentOS and Debian

> Install the XFCE desktop environment on Ubuntu, CentOS, and Debian to add a graphical interface for administration and troubleshooting.

Linux servers are provisioned without a graphical interface. Install XFCE to get a desktop environment for administration or troubleshooting tasks that are easier to perform in a visual workspace. XFCE is lightweight and runs well even on low-resource servers.

![XFCE desktop environment](https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image2.png?fit=max\&auto=format\&n=494jjlOXZiI1ohtY\&q=85\&s=f68fef740327196fb010d693894ccb15)

Connect to the server via [SSH](/hosting/virtual-servers/manage/connect/linux-server/connect-to-linux-server-via-ssh) or [VNC](/hosting/virtual-servers/manage/connect/connect-to-a-virtual-server-via-vnc) before starting. The login credentials are available on the **Instructions** tab in the [Gcore Hosting Portal](https://hosting.gcore.com/billmgr).

## Install XFCE

Select the tab that matches the server OS.

**Ubuntu**

1\. Update the package list:

```sh theme={null}
sudo apt-get update
```

2\. Install the XFCE environment and additional components (panel, file manager, and various plugins):

```sh theme={null}
sudo apt-get install xfce4-session xfce4-goodies
```

The system warns that the installation requires several hundred megabytes of disk space.

![Disk space warning](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image8.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=1a9a987fd475e575e86200ccf432ad0b)

Confirm with: `y`

![Confirmation prompt](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image12.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=ba89798d709302af507025b10995f27c)

3\. Install a display manager to launch XFCE. What happens next depends on the Ubuntu version:

> **A dialog appeared — select a display manager**
>
> The installer prompts to choose between **gdm3** and **lightdm**. Select **lightdm** and press **Enter**.
>
> ![Display manager selection: lightdm selected](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/4411242128145.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=8417d00cbec631c44e1a0164a5590982)

> **No dialog appeared — install xinit manually**
>
> ```sh theme={null}
> sudo apt install xinit
> ```
>
> The system warns that the installation requires several megabytes of disk space.
>
> ![xinit disk space warning](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image20.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=6d7b0d10d94b2fd7483e59e45ee7d2e0)
>
> Confirm with: `y`
>
> ![Confirmation prompt](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image24.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=4677372a10611235914b35006d6cccb8)

4\. Start the desktop environment.

If `lightdm` was installed in step 3, reboot the server — the graphical interface starts automatically:

```sh theme={null}
shutdown -r now
```

If `xinit` was installed in step 3, start the graphical interface directly:

```sh theme={null}
startx
```

**CentOS**

> [!NOTE]
>
> CentOS 8 reached End of Life on December 31, 2021. The official CentOS 8 package repositories are no longer maintained, so installation commands will fail on a stock CentOS 8 system. For new servers, use AlmaLinux or Rocky Linux as supported alternatives. The instructions below apply to CentOS 7.

1\. Install EPEL (Extra Packages for Enterprise Linux) — an open repository that contains the XFCE desktop environment packages:

```sh theme={null}
yum -y install epel-release
```

2\. Install the X Window System — the foundation for graphical interfaces on Linux.

For CentOS 7:

```sh theme={null}
yum -y groupinstall x11
```

For CentOS 8:

```sh theme={null}
yum -y groupinstall base-x
```

3\. Install the XFCE desktop environment from the EPEL repository:

```sh theme={null}
yum --enablerepo=epel -y groups install "Xfce"
```

4\. Create a startup script for xinit that tells it which desktop environment to launch:

```sh theme={null}
echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc
```

5\. Start the desktop environment:

```sh theme={null}
startx
```

> [!NOTE]
>
> If `startx` returns an error, re-run step 4 and then run `startx` again.

**Debian**

1\. Install the XFCE desktop environment:

```sh theme={null}
apt-get install xfce4
```

The system warns that the installation requires several hundred megabytes of disk space.

![Disk space warning](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image16.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=27da5d9be9dfb342f02d9d9de2ebede8)

Confirm with: `y`

2\. Install the optional XFCE components (panel, file manager, and plugins):

```sh theme={null}
apt-get install xfce4-goodies
```

The system warns that the installation requires several megabytes of disk space.

![xfce4-goodies disk space warning](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image27.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=5b2cf18d845c52b6dc8d24dc14b1ff05)

Confirm with: `y`

3\. Start the desktop environment:

```sh theme={null}
startx
```

## First start

On first start, XFCE prompts to select a panel configuration. Select **Use default config** to get the taskbar, clock, and pre-configured Applications menu. The empty panel option requires manual configuration.

![XFCE first-start panel configuration dialog](https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image11.png?fit=max\&auto=format\&n=494jjlOXZiI1ohtY\&q=85\&s=21c509f10a3e99d7976f2947aeb3a088)

The desktop with the default configuration looks as follows (minor details may vary by OS):

![XFCE desktop with default configuration](https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image2.png?fit=max\&auto=format\&n=494jjlOXZiI1ohtY\&q=85\&s=f68fef740327196fb010d693894ccb15)

If only folders and widgets are visible and the panel with the **Applications** button is missing, the panel is hidden at the top — move the slider up to reveal it.

![Slide up to reveal the hidden panel](https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image33.png?fit=max\&auto=format\&n=494jjlOXZiI1ohtY\&q=85\&s=3e6c40a61ec3c2bab8af357351269d99)

On Ubuntu with `lightdm`, the desktop starts automatically on each server boot. On CentOS and Debian (and Ubuntu with `xinit`), the terminal opens after a reboot — run `startx` to start XFCE again.

To open a terminal inside XFCE, click **Applications** in the upper-left corner and select **Terminal Emulator**.

![XFCE Applications menu with Terminal Emulator selected](https://mintcdn.com/gcore/494jjlOXZiI1ohtY/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image7.png?fit=max\&auto=format\&n=494jjlOXZiI1ohtY\&q=85\&s=da04a182948724ec04703f37fa67dfa3)

## Log out

Logging out of XFCE returns the session to the terminal.

**On Ubuntu with lightdm:** press **Ctrl+Alt+F1** — the session returns to the terminal immediately. The desktop restarts automatically on the next server boot.

**On CentOS, Debian, and Ubuntu with xinit:**

1\. Click **Applications** in the upper-left corner and select **Log Out** from the menu.

![XFCE Applications menu with Log Out selected](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image19.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=662dbbec6ef9cb21451491baf92db266)

2\. Select **Log Out** in the confirmation window.

![Log Out confirmation window](https://mintcdn.com/gcore/AVlk5NJu0Epwz6C_/images/docs/hosting/virtual-servers/manage/install-gui-desktop-environment-on-ubuntu-centos-and-debian/image29.png?fit=max\&auto=format\&n=AVlk5NJu0Epwz6C_\&q=85\&s=0b4900cc527eb0e779af80b302202ad7)

The session returns to the terminal. To start XFCE again, run `startx`.
