How to use RDP client for connect to UBUNTU

Install XRDP server on your UBUNTU workstation you can open a remote session from your windows machine via RDP and vino vnc server.

First you need to install xrdp:

sudo apt-get update && sudo apt-get install xrdp

Then configure /etc/xrdp/sesman.ini as show.

[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=1
UserWindowManager=startwm.sh
DefaultWindowManager=startwm.sh
[Security]
AllowRootLogin=1
MaxLoginRetry=4
TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins
[Sessions]
MaxSessions=10
KillDisconnected=0
IdleTimeLimit=30
DisconnectedTimeLimit=30
[Logging]
LogFile=/var/log/xrdp-sesman.log
LogLevel=DEBUG
EnableSyslog=0
SyslogLevel=DEBUG
[X11rdp]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
[Xvnc]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp

Configure /etc/xrdp/startwm.sh

#!/bin/sh

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

. /etc/X11/Xsession

Configure /etc/xrdp/xrdp.ini

[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=low
channel_code=1

[xrdp1]
name=Active Local Login
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5900

[xrdp2]
name=Clean Session
lib=libvnc.so
ip=127.0.0.1
port=-1
username=ask
password=ask

Then login with root to your UBUNTU workstation and configure “Remote Desktop”

  1. Assign a password to Vino with vino-password command
  2. Lunch vino-preferences
  3. Check “Allow other users to view your desktop” and “Allow other users to control your desktop” – this is to let others take control of this machine
  4. Uncheck “Ask you for confirmation” – when VNC is connected, VNC server will ask for a confirmation to local user.
  5. If possible, assign a password

However Vino server does not start until a user logs in.  This means that Vino server is not running at User Login screen.

For gets run Vino when gdm starts edit /etc/gdm/Init/Default
Add the following line right before exit 0 at the end of the file – Vino server runs when gdm starts up

/usr/lib/vino/vino-server &

However, when you logged in, gdm kill this vino-server.

To prevent this edit /etc/gdm/gdm.conf and type:

KillInitClients=false

Now, you should be able to connect to the machine using VNC.
If you are using Remote Desktop Client version 6 or more (windows Vista/7), you can have a protocol error with version xdp0.4.

Upgrade to xdp 0.5 downloading xrdp_0.5.0~20100303cvs-2_i386.deb and libssl0.9.8_0.9.8m-2_i386.deb

Installing vnc4server you can use your UBUNTU machine as Terminal Server selecting “Clean Session” on xrdp login screen.


sesman.ini Options:

  1. MaxSessionsPerUsers: Limit the number of sessions a user can have active at one time. (under ‘Sessions’)
  2. AllowSharing: Allow/disallow sharing same session. (under ‘Sessions’)
  3. MinServerDepth: Define color depth. (under ‘Xvnc’)
  4. MinDisplay MaxDisplay: Control the ports used by VNC (under ‘Globals’)
Advertisements

2 thoughts on “How to use RDP client for connect to UBUNTU

  1. Shane says:

    Hey – Thanks for the post.

    When I follow these instructions I get ” Problem connecting ” while trying to RDP to my Ubuntu machine. Can’t figure out what’s up with it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s