[Ubuntu] Xfce usage for RDP access to Ubuntu server

Laurab
Laurab
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:
reboot
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
EOF
4. Reboot a server from a client system or perform a command:
reboot
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
reboot
7. Create .xsession and .xsessionrc in home directory of user to be connected:
echo "xfce4-session" > ~/.xsession
D=/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share
D=${D}:/usr/share:/var/lib/snapd/desktop:/usr/share
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
EOF

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:

https://community.time4vps.eu/discussion/309/kvm-windows-connecting-to-kvm-windows-server-using-rdp/p








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.