Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.10.x : Can't run xrdp-chansrv in console VNC session #3240

Open
matt335672 opened this issue Sep 9, 2024 · 1 comment · May be fixed by #3243
Open

V0.10.x : Can't run xrdp-chansrv in console VNC session #3240

matt335672 opened this issue Sep 9, 2024 · 1 comment · May be fixed by #3243
Labels

Comments

@matt335672
Copy link
Member

xrdp version

0.10.x and later

Detailed xrdp version, build options

Pretty much any

Operating system & version

Any

Installation method

Doesn't matter

Which backend do you use?

x11vnc, typically

What desktop environment do you use?

various

Environment xrdp running on

Typically physical machine

What's your client?

Any

Area(s) with issue?

Clipboard, File transfer / drive redirection

Steps to reproduce

  1. Log the console in using Xorg. Start x11vnc with something like:-
x11vnc -display $DISPLAY -forever -repeat
  1. Make a note of the DISPLAY

  2. Create a VNC-compatible stanza for xrdp in xrdp.ini, e.g.:-

[localvnc]
name=localvnc
lib=libvnc.so
ip=localhost
port=5900
pamusername=asktestuser
pampassword=ask
chansrvport=DISPLAY(1)
enable_dynamic_resizing=false

The above is for console display :1

  1. Connect through from an RDP client

✔️ Expected Behavior

Clipboard and drive redirection available

❌ Actual Behavior

Clipboard and drive redirection not available. Chansrv log contains lines like these:-

[2024-09-09T15:15:37.732+0100] [ERROR] [setup_api_listen(chansrv.c:1380)] setup_api_listen: trans_listen failed for port /var/run/xrdp/1001/xrdpapi_1
[2024-09-09T15:15:37.497+0100] [ERROR] [setup_listen(chansrv.c:1357)] setup_listen: trans_listen failed for port /var/run/xrdp/1001/xrdp_chansrv_socket_1

Anything else?

See #3237

@matt335672 matt335672 added the bug label Sep 9, 2024
@matt335672
Copy link
Member Author

The socket directory needs to be present when chansrv is started, or chansrv can't create its main listening socket.

One option might be to move the socket directory for configurations like this. This has a couple of disadvantages:-

  1. The user has to create the directory in such a way that only the user and the xrdp process can access it. This is challenging to get right, and makes it hard for the xrdp team to re-design this directory.
  2. If the directory moves, other components like the sound driver(s) need to be aware this has happened. Again,the onus to get this right is on the user, rather than the developer(s).

A better solution is for chansrv to ask sesman to create the socket directory via an additional SCP message. If chansrv finds the socket directory for the user to be missing, it can simply ask sesman to create it.

This does require sesman to be running. UDS authentication will be adequate for this, and no complicated run-time configuration is required by the user.

I'm going to draft a solution along these lines.

@matt335672 matt335672 linked a pull request Sep 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant