Use xrdp to connect to desktop session

I use Ubuntu on my desktop. When I am away from my desktop, I would like to access the session using my Windows 7 laptop. Currently, I am using xrdp to connect, but it starts up a remote session. Is there any way to just use the same desktop session? I want to be able to pick up where I left off on the desktop.

Thanks


Solution 1:

Well, I was unable to find a way to do this with pure xrdp, but I did find a nice writeup on how to go about getting this set up as an rdp-to-vnc gateway. It works well enough to suit my purpose.

Taken from http://ubuntuwiki.net/index.php/Xrdp,_installing

  1. Install xrdp and vino

    sudo apt-get update && sudo apt-get install xrdp vino
    
  2. Configure vino so that you can remotely connect to the existing session

    Type vino-preferences from the terminal, check "Allow other users to view your desktop," "Allow other users to control your desktop," and configure the "Security" settings as you like (you will probably want to uncheck "confirm each access to this machine" and check "require the user to enter this password").

  3. Configure xrdp to access vino

    Edit /etc/xrdp/xrdp.ini, adding in the text below. Alter the name to whatever you fancy. Also, make sure that [xrdp1] uses a number that doesn't conflict with an existing configuration.

    # set empty username because VNC auth 
    # doesn't actually use username, so no
    # point in asking the user for one.
    
    [xrdp1]
    name=Active Local Login
    lib=libvnc.so
    username=
    password=ask
    ip=127.0.0.1
    port=5900
    

Solution 2:

Better yet, set your /etc/xrdp/xrdp.ini thusly:

[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=ask5910

This way it asks for the port with a default of 5910. If no vnc session exists on 5910 then a 5910 connection attempt will fail. In that case try again, but set the port to -1 to force the creation of a new session, typically on 5910.