Preparing the VPS for Installation

First, run the following commands to update and upgrade your system:

apt-get update
apt-get upgrade

Installing the GUI and XRDP

Next, run the following commands to install the GUI and XRDP:

apt-mark hold acpid acpi-support
apt install xubuntu-desktop
apt install xrdp
adduser xrdp ssl-cert
echo "startxfce4" > ~/.xsession
chmod +x ~/.xsession
systemctl restart xrdp.service

Here’s what each command does:

  • apt-mark hold acpid acpi-support: As of Q4 2022, there is a known issue during the xubuntu installation. To prevent this, run the following command first:
  • apt install xubuntu-desktop: Installs the Xubuntu desktop environment.
  • apt install xrdp: Installs XRDP.
  • adduser xrdp ssl-cert: Adds the xrdp user to the ssl-cert group.
  • echo "startxfce4" > ~/.xsession: Adds the "startxfce4" line to the .xsession file.
  • chmod +x ~/.xsession: Grants executable permissions to the .xsession file.
  • systemctl restart xrdp.service: Restarts the XRDP service.

Once these steps are completed, you can access the VPS GUI via your RDP client.

Adding a New User

To add a new user, run the following commands:

adduser newuser
usermod -aG xrdp newuser
usermod -aG sudo newuser

Here’s what each command does:

  • adduser newuser: Creates a new user with the username "newuser".
  • usermod -aG xrdp newuser: Adds the new user to the xrdp group.
  • usermod -aG sudo newuser: Adds the new user to the sudo group.

Next, switch to the new user, create a local session file for them, and restart XRDP:

su "newuser"
echo "startxfce4" > ~/.xsession
chmod +x ~/.xsession
systemctl restart xrdp

Now, you can log in to the GUI with the newly created user.

Was this answer helpful? 74 Users Found This Useful (277 Votes)