This solution is a bit of a messy hack, but it should work until xrdp/Xvnc are fixed.
What is XRDP?
It is a vnc-like server to allow you to connect to ubuntu from a windows machine (or using rdesktop) in the same way that Windows Remote Desktop does. (i.e. no additional software on the windows machine is needed). website here.
What is this guide
This guide will help set up xrdp on Ubuntu and, optionally get it working with GNOME (this has been a difficulty for many people). The GNOME solution is a bit of a hack, and certainly not perfect, but its the first working solution I've seen. It has been tested by myself on Edgy only, although it should work on any other version too. Let me know!
The manner in which it works with gnome is to have an extra layer of vnc (using x11vnc). The problem is that you MUST have already logged on as yourself before trying to use xrdp. But IMO its better than nothing. The end result is actually a lot more like the bahaviour of RDP on Windows XP.
The first two sections (sufficient for running kde with xrdp) should be usable by anyone, and can be easily undone.
The third section should probably only be used by those who understand what the instructions do.
1) GETTING XVNC TO WORK
xrdp relies on Xvnc, which has problems with fonts (which we will fix!)
now create a password file for Xvnc (this password is only for testing now, it will not be needed later so anything can be used)
sudo apt-get install Xvnc
now, running Xvnc at the moment will probably not work. try it:
It will almost definitely give erroros about fonts but if it doesn't exit outright, and instead waits around for a connection you can proceed to section 2).
Otherwise, you need to link to your fonts directory so that you can run Xvnc.
This renames your fonts folder. If something drastic goes wrong, just rename it back!
sudo mv fonts fonts.bak
now to link to the proper folder:
now try Xvnc again:
sudo ln -s /usr/share/fonts/X11/ fonts
and hopefully it wont crash, which should mean xrdp can run properly!
2) INSTALLING XRDP
It needs to be downloaded and compiled, so we'll need to install some tools:
now download the latest version (0.3.2) from sourceforge, or type
sudo apt-get install build-essential libpam0g-dev libssl-dev x11vnc vncviewer fakeroot checkinstall x11vnc
now, cd to the folder you downloaded it to and type:
If it asks questions just accept the defaults
tar -zxvf xrdp-0.3.2.tar.gz
This will result in an error about not being able to install the package, but ignore that.
Once its done there should be a .deb package in the xrdp folder that can be installed in the usual manner (by double-clicking it, or using sudo dpkg -i _packagename_)
The package can be uninstalled by using synaptic or
sudo apt-get uninstall xrdp
If you run KDE then the howto is now complete!
either way test it by running You should be able to log in if you have KDE installed but it probably wont work if you use gnome. This seems to be a problem with Xvnc, and there currently seems to be no proper solution(i'm not sure about other desktop environments like XFCE).
EDIT --- it has been pointed out to me that at this point usingthe command
to downgrade to a different version of vnc4server makes gnome work fine.
sudo apt-get install vnc4server=4.1.1+xorg1.0.2-0ubuntu1
However, following section 3 will enable xrdp to run like the windows version: i.e display the same session as you were previously logged onto. If this is what you want, follow the instructions below, however you may be better advised to instead use rdp as it was meant to be used, then run x11vnc on their previous display. Proceed only if you understand whats going on, and its limitations.
Now comes messy but necessary part if you really want gnome.
XRDP uses a file called startwm.sh to determine which Desktop environment to use. Any program can be run in this file (the defaults are things like gnome-session, but gnome session can't run inside Xvnc).
The only solution I can find is to first run x11vnc, which runs a vnc server that captures an already running session (hence the need to be logged in already) and then run vncviewer in fullscreen mode instead of having a desktop environment running.
so, backup startwm.sh
and enter the following code into the file:
sudo mv startwm.sh startwm.sh.bak
sudo gedit startwm.sh
and make it executable:
x11vnc -display :0 -localhost &
vncviewer localhost:0 -fullscreen
Now, make sure you are logged on to your desktop, go to a windows machine and log onto you ubuntu machine using remote desktop, and hopefully it'll work.
sudo chmod +x startwm.sh
PS. This guide is entirely my own work. I found the font fix on these forums, i'm not sure where but its posted many times by many people. The hack I came up with myself. This is my first tutorial and I wrote it in a bit of a hurry as I was so excited to have found a way to make xrdp, ubuntu and gnome work together; I've been trying for about a year - periodically looking for solutions. All comments, criticisms, sugesstions and requests for help are welcome, but try to post exactly where things went wrong and what any errors were.