How to locally resume a session that has been started remotely using xrdp?

5

1

Is it possible to connect to a RD session that has been started (and abandoned) from a remote machine using xrdp? Also I'd like to be able to do the exact opposite: to remotely login to a session that has been initiated locally.
I'm trying to get as close as possible to how Windows RD behaves. (Which also includes that the session would use my terminal machine/monitor resolution. I wasn't able to achieve that using VNC.)

Suggestions to a better alternative to xrdp are welcome please. I don't know Linux too much.

Jaroslav Záruba

Posted 2011-01-10T15:54:46.843

Reputation: 718

Answers

0

This is how one can connect to a locally started session: Xrdp, installing.

To connect locally to a remotely initiated session one would probably use some VNC client, simply connect via VNC to your own machine...? My understanding is that xrdp is kinda 'layer' above VNC so the VNC server is running anyways.

Jaroslav Záruba

Posted 2011-01-10T15:54:46.843

Reputation: 718

2

xrdp runs xvnc over rdp and does so very well. The default configuration launches a new xvnc session on each connection, starting at port 5910. To get it to reconnect to an existing session, edit /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.

Steven Tryon

Posted 2011-01-10T15:54:46.843

Reputation: 21

1OK, so I did this. The login screen then has three inputs: username, password, port, and the port number has been prefilled with 5910. When I press OK it says it failed to connect. So I typed -1 into the port address and it logged me in, but did not reconnect me to my session. – SDsolar – 2017-01-27T10:49:27.933

1

One option if you have ssh connection to the other machine is to find the litening ports for vnc as explained at the end of this post

You could login a ssh session and find out the number by

netstat -tulpn | grep vnc

and you will get something like the following

tcp   0    0 127.0.0.1:5910     0.0.0.0:*     LISTEN      5365/Xvnc

and then you know 5910 was the port you connected to.

Pablo Marin-Garcia

Posted 2011-01-10T15:54:46.843

Reputation: 247

this was super helpful thank you I had to figure out what port XRDP was running on and specify it in the .ini file so that I could reconnect to an existing XRDP session that was already in progress – anon58192932 – 2018-05-08T03:00:57.517