45

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

2
  • Did you look at this question? askubuntu.com/questions/133343/…
    – Barbarrosa
    Jan 4, 2013 at 3:54
  • Yes. I believe they are referring to connecting to existing remote sessions upon subsequent logins (which works for me, too). However, I want to connect to the desktop session and reuse that.
    – Jonathan B
    Jan 4, 2013 at 14:41

5 Answers 5

32

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
    
6
  • 1
    Do you know if it's possible to access the console's login screen? In the event I have to reboot the computer remotely, I would like to login at the console so when I return home, the desktop will still be there.
    – Toland H
    Mar 19, 2014 at 23:11
  • Was the guide really complete? I don't appear to have a running VNC server after following all the steps. I see "connecting to 127.0.0.1:5900 error - problem connecting" when I try to connect using freerdp. Apr 2, 2014 at 1:48
  • 1
    Vino doesn't start automatically on XFCE. I raised a bug and explained a fix here: bugzilla.gnome.org/show_bug.cgi?id=727473 Apr 2, 2014 at 2:40
  • I also get a "Problem Connecting" - but if I use netstat it tells me that I have vino-server running on ports 5800 (ipv6 only) and 5900 (both ipv4 and ipv6). I am using a default ubuntu install, and I have made sure that I have check the appropriate boxes to allow others to connect to and control my desktop. Oct 5, 2014 at 19:24
  • 1
    As @IainElder link suggests I have managed vino-server to start automaticly. Now that I try to connect I get this error "started connecting connecting to 127.0.0.1 5900 tcp connected security level is 0 (1 = none, 2 = standard) error - problem connecting". I log in with the right ip adress, provide the username and password "ubuntu" and "ubuntu" and port 5900. UPDATE: solved it using this command ´gsettings set org.gnome.Vino require-encryption false´ and ´sudo reboot´ Jul 6, 2015 at 13:19
2

When installing xrdp, xfce and changing the xrdp.ini (as shown in your own answer), I was able to rejoin to a remote session. Still, I was unable to share the desktop, in other words to rejoin the local session.

The vino stuff does not work for me, I got the message "connecting to 127.0.0.1:5900 error - problem connecting". From my point of view, this is because of a missing vncserver as iain-samuel-mclean-elder points out in a comment.

Long story short, I managed it to work properly with x11vnc. When the computer starts up, a service is calling x11vnc.

The instructions you need to follow are only from the two links below.

--> I just changed the /etc/xrdp/xrdp.ini file to my own needs:

...
[xrdp1]
name=Remote Session
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=ask-1
         
[xrdp2]
name=Local Session
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5900
...

The nice thing on this set up is, if you connect from Windows with the standard rdp, you can reboot the computer remotely and connect remotely again you end up on the normal log on screen of the computer as you would sit in front of it. Choose "Local Session" on the xrdp menu after connecting with rdp. The password is the vncserver passwd, which you chose, when you followed the c-nergy-link above. If you just want to open another session, you can go for the "remote session".

1
  • this works, but it is not faster than the built in VNC of Ubuntu (probably because libvnc is used?). It is still slower than Teamviewer/Anydesk, I tried XRDP because I was looking for a solution to share desktop within my LAN, and noticed VNC is a little bit sluggish compared to the 2 commercial solutions. Anydesk is faster but requires internet connection to be present even when connecting within LAN.
    – zilexa
    Apr 13, 2021 at 12:25
1

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.

1
  • 5
    That's not what the OP asked for...
    – einpoklum
    Apr 25, 2015 at 19:44
0

Please try the following:

In your /etc/xrdp/xrdp.ini file increase the delay_ms value from the already existing value.

I encountered the same problem and changed this delay_ms from 2000 to 5000 and it worked for me.

Not sure if this is something to do with the network speed.

0

The Xubuntu I am currently using does nicely allow me to pick up an existing session somewhere else. This only works if I am going for a remote session (xrdp) of anotber remote session. If the session I wish to take over is the system console, it does not work for any ID actively associated with the system console.

What this suggests is that the session you wish to take over needs to also be a remote session.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .