frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

[Ubuntu] Xfce usage for RDP access to Ubuntu server

LaurabLaurab Moderator
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.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2018 Time4VPS. All rights reserved.

Get In Touch