[KVM Ubuntu 18.04] XFCE usage for xrdp access to Ubuntu 18.04

Laurab
Laurab

Based on the work of FreeRDP and rdesktop, xrdp uses the remote desktop protocol to present a GUI to the user. Xrdp currently supports all 3 encryption levels via the xrdp.ini file.
In this tutorial we will provide an instruction on how to setup xrdp connection tu Ubuntu 18.04 server with XFCE graphical enviroment. 
Why XFCE? Because Xfce is a lightweight desktop environment for Linux operating system, so more resources will be for your services usage.

1. Install Xfce desktop environment:
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. 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. It is a tutorial on how to connect to Windows server, but also, you can use it to connect to XFCE desktop environment:

https://community.time4vps.eu/discussion/309/kvm-windows-connecting-to-kvm-windows-server-using-rdp/p
Sign In or Register to comment.
© 2013 - 2017 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.