EC2- RDP Example

$EC2- RDP Configuration

Desktop ManagerSince the current desktop manager of Ubuntu (Unity which runs on Gnome) no longer seems to work with xRDP, an alternative desktop manager needs to be installed.
I tried OpenBox, but wasn’t very impressed by the amount of work needed to get a reasonable desktop.
We will use another desktop manager that has been around for quite a long time is XFCE, which is lightweight and fast.
Note : A light weight desktop manager helps making a remote desktop connection much more enjoyable.
Installing xRDP and XFCEInstalling xRDP and XFCE is pretty easy, once you know what to do …
Just make sure you have an Internet connection before you start.
Step 1 – Install xRDPWe will use sudo and apt-get to update your system and install xRDP. Keep in mind that sudo will ask for your admin password.

sudo apt-get update
sudo apt-get install xrdp
Step 2 – Install XFCE4Again we will use sudo and apt-get:

sudo apt-get install xfce4
Step 3 – Configure xRDPIn this step we modify 2 files to make sure xRDP uses xfce4.
First we need to create or edit our .xsession  file in our home directory.
We can either use nano or simply redirect an echo statement (easier):

echo xfce4-session >~/.xsession
The second file we need to edit is the startup file for xRDP, so it will start xfce4.

nano /etc/xrdp/
The content should look like this (pay attention to the last line):


if [ -r /etc/default/locale ]; then
  . /etc/default/locale

Step 4 – Restart xRDPTo make all these changes effective, restart xRDP as such:

sudo service xrdp restart
Testing your xRDP connectionOn the computer that will remotely control your Ubuntu machine, start you RDP client.
Windows comes standard with a Remote Desktop client (mstsc.exe – you can start it from a command prompt, or find the shortcut to Remote Desktop under Accessories).
For a Mac, Microsoft actually has a Remote Desktop Client which can be found in the Apple App Store, or you can use Cord (free).
Whichever client you use, most work with either the computer network name or IP address of your Ubuntu machine.
To find the IP address on your Ubuntu box, type:

hostname -I
(note: this is a capital “i”)
Depending on your RDP client capabilities and settings (for example: Microsoft RDP Client allows automatic login), you might or might not see the login screen.
Here we enter our Ubuntu username and password and click “OK”, after which briefly a window will show with the login process and you’ll have access to your Ubuntu machine, even though the desktop looks different. One downside I’ve discovered so far is that the clipboard is NOT being synchronized … so Copy and Paste between machines does not work properly.

 image 1

 xRDP – Login screen

 image 2