[Ubuntu] Xfce usage for RDP access to Ubuntu server

edited August 9 in Various Tutorials

In this tutorial we will provide an instruction on how to setup RDP connection to your Ubuntu server with Xfce graphical environment.

Why Xfce? Because Xfce is a lightweight desktop environment for Linux operating system, so more resources will be for your services usage.

0. Requirements:

Freshly installed Ubuntu operating system on our Standard or KVM Linux server.

1. Install Xfce desktop environment:
apt-get update
apt install -y xubuntu-desktop
Check for a default display manager lightdm.

2. Reboot a server from a client system or perform a command:
3. Let's make selected display manager to be automated:
apt install -y expect
cat <<EOF | expect
set timeout -1
spawn sudo apt install -y xubuntu-desktop
expect "Default display manager: "
send "lightdm\n"
expect eof
4. Reboot a server from a client system or perform a command:
5. Install xrdp:
apt install -y xrdp
sed -e 's/^new_cursors=true/new_cursors=false/g' \
           -i /etc/xrdp/xrdp.ini
systemctl enable xrdp
systemctl restart xrdp
6. For Standard VPS
Remove Network manager which will prevent proper network configuration and restart server
apt-get remove network-manage
7. Create .xsession and .xsessionrc in home directory of user to be connected:
echo "xfce4-session" > ~/.xsession
cat <<EOF > ~/.xsessionrc
export XDG_SESSION_DESKTOP=xubuntu
export XDG_DATA_DIRS=${D}
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg

Connect to the server via any Remote Desktop client that you are using. Here is a tutorial on how to connect to server through RDP on Windows and on Linux:


Sign In or Register to comment.
© 2013 - 2018 Time4VPS. All rights reserved. Powered by Vanilla
The opinions or views of users on the forum are those of the author and not of Time4VPS.