Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions How-to-Install-a-Desktop-Environment-on-Ubuntu-24.04-Server/01-en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
title: How to Install a Desktop Environment on Ubuntu 24.04 Server
description: Learn how to install and configure a graphical desktop environment on Ubuntu 24.04 Server edition.
level: [beginner]
updated_at: 2025-08-15
slug: ubuntu-24-desktop-environment-installation
author_name: liubenxi-dot
author_url: https://github.com/liubenxi-dot
author_image:
author_bio:
tags: [ubuntu, linux, desktop, gui]
netcup_product_url: https://www.netcup.com/en/server/root-server/rs-2000-g11-iv-12m#rs-2000-g11-iv-12m-nue
language: en
available_languages: [en]
---

# Introduction
This tutorial explains how to install a desktop environment on Ubuntu 24.04 Server edition. While Ubuntu Server is designed to run without a graphical interface for efficiency, there are situations where having a desktop environment can be beneficial for certain applications or user preferences.

The process takes approximately 15-30 minutes depending on your internet connection speed and the desktop environment you choose to install.

This guide assumes you have basic familiarity with the Linux command line and have already set up your Ubuntu 24.04 Server installation.

# Requirements
- A running Ubuntu 24.04 Server installation
- SSH access or physical console access to the server
- At least 2GB of RAM (4GB recommended for a smooth experience)
- Minimum 10GB of free disk space
- sudo privileges

# Step 1 - Update your system
Before installing any new software, it's important to update your system packages to their latest versions.

- Connect to your server via SSH or directly through the console.
- Run the following commands to update your package lists and upgrade existing packages:
```bash
sudo apt update
sudo apt upgrade -y
- Reboot your system if necessary after the upgrade# (optional):
```bash
sudo reboot

# Step 2 - Choose and install a desktop environment

For this tutorial, we'll install GNOME, but the process is similar for other desktop environments.

Install the GNOME desktop environment with:

```bash
sudo apt install ubuntu-desktop -y
```
Alternatively, for a minimal installation without extra applications:

```bash
sudo apt install --no-install-recommends ubuntu-desktop-minimal -y
```

# Step 3 - Install a display manager

A display manager handles user authentication and starts the desktop session. The default for GNOME is GDM3.

Install GDM3 with:

```bash
sudo apt install gdm3 -y
```
During installation, you may be prompted to choose between gdm3 and lightdm. Select gdm3 if you're using GNOME.

# Step 4 - Set the default target to graphical

To automatically boot into the graphical interface:

1. Set the default target to graphical:

```bash
sudo systemctl set-default graphical.target
```
2. If you want to start the graphical interface immediately without rebooting, run:

```bash
sudo systemctl start gdm
```
# Step 5 - Configure automatic login (optional)

If you want to automatically log in to your desktop environment:

1. Edit the GDM configuration file:

``` bash
sudo nano /etc/gdm3/custom.conf
```
2. Find the `[daemon]` section and add or uncomment these lines:
``` text
AutomaticLoginEnable = true
AutomaticLogin = your_username
```
Replace `your_username` with your actual username.

3. Save the file and exit.

# Step 6 - Reboot and test

Reboot your system to start with the graphical interface:

```bash
sudo reboot
```
After rebooting, you should see the GDM login screen. Log in with your username and password to access your new desktop environment.

# Step 7 - Remote access (optional)

To access your desktop remotely, you can install and configure a remote desktop solution like xRDP:

1. Install xRDP:

``` bash
sudo apt install xrdp -y
```
2. Add xRDP to the ssl-cert group:

``` bash
sudo adduser xrdp ssl-cert
```
3. Restart the xRDP service:

```bash
sudo systemctl restart xrdp
```
4. Configure your firewall to allow RDP connections (default port 3389):

```bash
sudo ufw allow 3389/tcp
```
You can now connect to your Ubuntu desktop using any RDP client.

# Conclusion

You have successfully installed a desktop environment on your Ubuntu 24.04 Server. Your system now boots into a graphical interface where you can use GUI applications alongside your server functionalities.

Remember that running a desktop environment consumes additional system resources. If performance is critical for your server, consider whether you need the desktop environment running at all times.

# Licence

[MIT](https://github.com/netcup-community/community-tutorials/blob/main/LICENSE)

Copyright (c) 2024 netcup

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Contributor's Certificate of Origin

By making a contribution to this project, I certify that:

1. The contribution was created in whole or in part by me and I have the right to submit it under the licence indicated in the file; or

2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate licence and I have the right under that licence to submit that work with modifications, whether created in whole or in part by me, under the same licence (unless I am permitted to submit under a different licence), as indicated in the file; or

3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the licence(s) involved.
Loading