xfce-desktopxfce-desktop

In this blog post, we will guide you on how to install the Ubuntu Desktop environment using the lightweight desktop environment XFCE. We will also show you how to configure RDP access to a VM and access that RDP using SSH tunnelling.

Update the System using the following two commands.

sudo apt update
sudo apt upgrade


To install xfce4 run the following command
sudo apt-get install xfce4

Enable RDP access to VM
XRDP provides a graphical login to remote machines using RDP (Microsoft Remote Desktop Protocol). https://www.xrdp.org/

To Install xrdp run the following commands
sudo apt-get -y install xrdp
echo xfce4-session >~/.xsession
sudo service xrdp restart

To access the host directly, use the RDP client and enter the VM’s external IP. Don’t forget to enable inbound access on Azure NSG (port 3389) connected to your VM.

Configure SSH tunneling
If you are unable to open RDP or do not want to use it, you can access the RDP endpoint on the VM using SSH tunnelling on port 22.

Enable port forwarding in the SSH configuration file
In order to enable SSH forwarding, you need to modify the SSH configuration file.
sudo nano /etc/ssh/sshd_config
Remove hashtag from # AllowTcpForwarding yes
AllowTcpForwarding yes

Please use the following command to restart the services.
sudo service SSH restart

Create SSH Tunnel
To create a tunnel, please follow these steps:
Open the command line on your PC.
Run the following command:
ssh -L 4000:127.0.0.1:3389 dan@x.x.x.x

After you execute, this command will listen for incoming traffic on port 4000 on your local PC, forward it through port 22, and allow you to access a VM on the other end at port 3389.

Note: Replace dan@x.x.x.x with the external IP address of your VM host (xxxx).
Once you have established the tunnel, run the RDP client on your Windows machine.
Use localhost:4000 to initiate the session.

For XRDP screen, select the default Xorg session type and log in using your ID and password.

Here’s the XFCE4 desktop environment. It may not be the most visually appealing, but it’s incredibly lightweight and speedy.

If you have any questions or encounter any issues, please let me know.

By Dan Djurasovic

Dan is an Azure Technical Advisor, with over a dozen years of IT experience, specializing in Microsoft Office 365, Exchange Server Azure IaaS and Active Directory..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.