I can not configure XRDP to reconnect to an existing session in Ubuntu 20

2.9k Views Asked by At

I have configured XRDP's Xorg port with ask5901 as shown in xrdp.ini (found that solution after googling it - How to reuse the session in ubuntu using xrdp). But this just gives me a black screen on first connect always. If I revert back to port = -1, then it starts connecting but the reconnect gives me black screen now - I have to kill existing session to make it work.

Has anyone gotten this to work? Why is this so difficult to get working? I am down to change XRDP code to fix this - if anyone can give me pointers to how the interaction works.

[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=ask5901
code=20

[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=ask5902
#xserverbpp=24
#delay_ms=2000

[vnc-any]
name=vnc-any
lib=libvnc.so
ip=ask
port=ask5900
username=na
password=ask
#pamusername=asksame
#pampassword=asksame
#pamsessionmng=127.0.0.1
#delay_ms=2000

[neutrinordp-any]
name=neutrinordp-any
lib=libxrdpneutrinordp.so
ip=ask
port=ask3389
username=ask
password=ask
1

There are 1 best solutions below

0
On

I have a similar issue. According to what I've found, xrdp only supports either logon locally or remotely under the same account.

I did a bypass with SSH to force sign out the (graphical) session from remote.

Here is the command:

$env DISPLAY=0.0 gnome-session-quit --force

Then you could remote with xrdp.