I have been trying to set up a RDP terminal server on precise using xrdp and have been having significant trouble getting a working configuration. When a user logs on, I need it to connect to that users existing session if it exists, otherwise starting a new session, and any started session must start LXDE. What changes to the default configuration do I need to make in order for this to work?
I had this same problem, and I just found an easy solution. I originally just installed xrdp using the standard proceedure:
apt-get install xrdp
After that, its all about your xrdp.ini file, which is located here:
by default the first xrdp session handling script looks like this:
The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:
Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.
I hate to be the guy who just drops a link, but I followed the guide here and it worked really well. I can now log into an RDP session from Linux and Windows hosts and reconnects me to my old session if I've logged in before. This is the best guide to the install I've found. Unfortunately, the standard package install causes a lot more problems than doing it from source.
The author of that link has also made an automatic tool to install and configure it, but I haven't tried it, so be careful.
Hope that helps you out.
on the log in screen with the xrdp box when you first connect to the remote desktop there should be a drop down box, from here choose "vnc-any" then input the ip address of the computer and the password but leave the port at what it is, this should help :)
This UbuntuForum thread looks useful - I havent tested this myself - however I've copied the solution given here to complete this answer.
1. Uninstallation of the default Ubuntu VNC server (Vino):
Go to: System --> Administration --> Synaptic Package Manager
Search for the "Vino" package, Mark For Removal, Apply.
2. Installation of TightVNC and XRDP:
While you are using Synaptic Package Manager, seacrh for "tightvnc" package (be careful, not "xtightvnc") and Mark For Installation. Likewise, search for the "xrdp" package and Mark also For Installation. Apply.
PS: if you want, you may discard any other "vnc" package that you don't need!
3. Configuration of XRDP (Optional)
Open a terminal and type the three following commands:
cp xrdp.ini xrdp.ini.bak
sudo gedit /etc/xrdp/xrdp.ini
Remove Xrdp2-Xrdp6 sections, leave only the Xrdp1 section. Your xrdp.ini should look like this:
Restart the system and you are ready to connect!
To connect from another Ubuntu machine, use: Applications --> Internet --> Terminal Server Client, type the IP of your Ubuntu VNC machine, use RDPv5 or RDP, click Connect!
To connect from a Windows-based machine, use: Start --> Run --> mstsc, type the IP of your Ubuntu VNC machine, click Connect.
When connected, use your Ubuntu user account credentials (u/n and p/w) and remotely login to your desktop.
The best explanation/solution I've found on the internet can be found at this location http://c-nergy.be/blog/?p=2879
Give it a try
I hope this information help
I ran into this problem on a Debian machine. Used X11RDP-o-Matic to build xrdp 0.7 packages. Prior to upgrading to systemd, xrdp session reconnect worked fine.
Looking at the process tree I could see that the sessions were no longer children of xrdp-sesman. Turned out to be a permissions issue when using systemd. Google found a patch that fixes the problem.
How do you identify a working reconnect? Run ps axf and look at the process tree for xrdp-sesman. X11rdp, xrdp-chansrv, xrdp-sessvc should all be running as a child. If they are not, xrdp-sesman will not know how to reconnect to the session.
X11rdp, xrdp-chansrv, xrdp-sessvc
Here's what it looks like when working:
I can't run xRDP out of the box in ubuntu 10.04. I run xrdp on a laptop and try to connect to it using Window RDP client. It connect to RDP which prompt for a type of connection I tried any of them but all can;t work it gives a connection error. I got the following in the log.
[20110410-18:57:51] [INFO ] scp thread on sck 5 started successfully
[20110410-18:57:51] [INFO ] granted TS access to user test
[20110410-18:57:51] [INFO ] starting Xrdp session...
[20110410-18:57:51] [INFO ] starting sessvc - xpid=7046 - wmpid=7045
[20110410-18:57:52] [INFO ] session 7044 - user test - terminated
I had problems the xRDP package for 10.4. I downloaded an installed the package from 10.10 and it works well. I also had problems with some of the VNC servers. I am currently running vnc4server successfully.
See my setup for Remote Desktops with VNC and RDP for more details.
I have installed vnc4server (xvnc) and I use "sesman-Xvnc" as module. I am running ubuntu 10.10 however.
Note that xrdp has to connect to a VNC server, so you have to have a vnc server installed.