How to: RDP to Ubuntu

If like me, you RDP to VMs running in Hyper-V, XenServer or vSphere quite often and you run Ubuntu you likely want to remote to these VMs too. Every time I setup a new Linux VM, I set this up. I documented the manual process for my own purposes and I thought I’d share. There are alternatives to using RDP of course but this is for those of you who prefer it.

step1

Enter sudo apt-get update and hit enter. When prompted enter suitable credentials.

step2

Enter sudo apt-get install xrdp and hit enter. This will install xrdp the remote desktop agent.

step3

Enter sudo apt-get install xfce4 and hit enter.  This will install Xfce desktop environment.

step4

Enter echo xfce4-session >~/.xsession and hit enter.

step5

Enter sudo nano /etc/xrdp/startwm.sh and hit enter to modify the text file.

step6

Remove the line . /etc/X11/Xsession and add the line startxfce4 and then hit ctrl+X and save the file.

step7

Enter sudo service xrdp restart and hit enter.

step8

Enter hostname -I and hit enter. Make a note of the IP address.

step9

Enter sudo usermod -a -G tsusers <username> and hit enter. This will add your account to the tsusers group which by default is the group with rights to RDP to this machine. Repeat this for all accounts you wish to RDP to the box with.

step10

Launch the RDP client on your Windows machine, Mac or whatever you use and Connect to the IP address from your Ubuntu VM.

step11

Enter your account credentials. Remember the username is case sensitive and hit OK.

step12

The desktop will look pretty different but you should be able to work with it.

About author

Rorymon

Microsoft MVP in App-V. Citrix CTA. VMware vExpert. Unidesk Certified Engineer

SCCM Error after Installation

You might have received an error code when trying to deploy an application via SCCM. The error code:  0x80070002(-2147024894) The frustrating part about the error ...