Tag Archives: rdp

Xrdp configuration to connect existing session

xrdp
The RDP protocol is very convenient to manage windows and linux servers. But if you use Xrdp as terminal server, you may notice new session always creates when connection established.

The CentOS (RedHat) rdp server implementation is more useful, because can connect to existing session by default. But Ubuntu (Debian) always creates new session if you configure it as “port=-1” setting in xrdp.ini file:

[xrdp2]
name=test-name
...
port=-1

But if you set port to certain value, connection problem occurs.
To fix the problem I recommend to create two different xrdp configurations in xrdp.ini file:

[xrdp1]
name=existing-session
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5910

[xrdp2]
name=new-session
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

So, for the first connection you have to use “new-session” configuration, and the next one will be used “existing-session” configuration by default.
Make sure, you are connecting to 5910 port (in my case).