How to connect to Ubuntu Server 13.10 on Amazon EC2 using XRDP

By default, the Amazon EC2 Ubuntu Server instance does not come with a GUI desktop environment. You can only connect to it via SSH using a client side application like “Putty” to perform any operations on it. This post will be focused on how to setup a remote desktop environment on the Ubuntu Server 13.10 using xrdp so one can connect to it using Remote Desktop.

At first when I installed the Remote Desktop Protocol (RDP) server (xrdp) via the Ubuntu Software Centre which runs on my local machine VirtualBox, I tried to RDP to it but for some reasons, the screen appeared Grey.

ubuntu-rdp01

After further research, it appeared the gnome packages are broken hence causing xrdp not to work as expected. Since I am looking to set this up on my Ubuntu Server running on Amazon EC2, this means I would have to do all the setup via SSH using Putty client.

I have documented below known workaround which involves installing a different desktop environment (xfce 4 desktop) but still subject to further testings.

Step 1: Install Updates

– Open Putty, connect to your Ubuntu Instance using the Public DNS address and run following commands

# sudo apt-get update

# sudo apt-get upgrade

ubuntu-rdp02

Step 2: Install XRDP Packages

– Run the following command

# sudo apt-get install xrdp

ubuntu-rdp03

Step 3: Restart the Machine

– Run command to restart the machine

# sudo shutdown -r now

ubuntu-rdp04

Step 4: Install xfce 4 desktop

– Run the following commands to install xfce 4

# sudo add-apt-repository ppa:xubuntu-dev/xfce-4.10

ubuntu-rdp05

# sudo apt-get update
# sudo apt-get install xfce4

ubuntu-rdp06

Note: this bit would take sometime 🙂

Step 5: Configure xfce

– We need to configure the session to log into when we connect via xrdp. Run the following commands to accomplish this task

# echo xfce4-session >~/.xsession

# sudo service xrdp restart

ubuntu-rdp07

Step 6: Create a User account

– This account will be used for the RDP login session. Run the following command and following the screen prompt to enter a password

# sudo adduser sysadmin

ubuntu-rdp08

Step 7: Connect to Machine

– Open Remote Desktop screen, enter the Public DNS address of your EC2 instance and click connect. Then  you will be presented with the login screen. Enter the newly created account username and password and connect

ubuntu-rdp09

– On the Welcome message, click “Use default config

ubuntu-rdp10

Issues Noticed: I have outlined below few of the issues I have noticed and I am currently looking into each case.

– Unable to reconnect to an existing session. Each time I close my session and login again, it gives me a new session hence unable to regain previous session
– The screen isn’t auto re-sizing meaning I have to expand the screen to FULL
–  When I logout, the system does not logout completely. It stays on a Grey screen
– When logging in, the screen pixels isn’t loading fast or sharp. It appears to be dragging while loading my desktop

 
comments powered by Disqus