Setup Ubuntu Server 22.04
Last updated
Last updated
CPU: 4C/8T
the lab take environ 77GB (but you have to get the space for the vms vagrant images windows server 2016 (22GB) / windows server 2019 (14GB) / ubuntu 22.04 (502M))
the total space needed for the lab is ~115 GB (and more if you take snapshots)
Before you start to install xrdp on Ubuntu 22.04, you need to log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our article the .
Now follow the steps below to complete this guide.
XRDP server is designed to control only desktop systems. The Desktop environment is not available on Ubuntu by default. You need to add a to your system.
First of all, update and upgrade your local package index with the following command:
Install Tasksel Utility
Then, install the Tasksel utility to install a Desktop environment on Ubuntu 22.04 with the following command:
Now you need to launch the Tasksel with the following command:
You will see the package configuration:
Find the Ubuntu desktop by using the arrow keys. Press space to select it and then press tab to select ok and hit enter to install the Ubuntu desktop.
Now you need to set your system boots into the graphical target. You can use the following command:
Then, you need to reboot your system to apply these changes.
After that, Let’s start to install XRDP Remote Desktop on your server.
The XRDP packages are available in the Ubuntu 22.04 default repository. To install it you can use the following command:
When your installation is finished, verify that you have installed it successfully with the following command:
In your output you should see:
This means that the XRDP on Ubuntu 22.04 is active and running.
Let’s start to configure XRDP.
From the installation, XRDP added a user named “xrdp”. The xrdp session uses a certificate key file “/etc/ssl/private/ssl-cert-snakeoil.key
”.
You need to add the xrdp user to the “ssl-cert
” group with the following command:
Now you need to edit the /etc/xrdp/startwm.sh
file. Open the XRDP file on Ubuntu 22.04 with your favorite text editor, here we use vi:
Add the following commands before the commands that test & execute Xsession:
When you are done, save and close the file.
To apply these changes restart XRDP on Ubuntu 22.04 with the following command:
Change power settings so the server does not go to sleep and shuts off while inactive