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

Wait for capabilities message from Xorg #3197

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

matt335672
Copy link
Member

This is partly mentioned in #1816

This commit adds a stage into the Xorg connection status to wait for the capabilities message from the Xorg server.

This allows us to move the xorgxrdp version check to xrdp from the X server for better reporting to the user.

This PR needs neutrinolabs/xorgxrdp#332 to function correctly, but can be merged separately.

Currently, if the xrdp and xorgxrdp versions don't match:-

  1. The connection terminates immediately.
  2. The version mismatch is reported in ~/.xorgxrdp.$D.log (not xrdp.log)
  3. The X server aborts.

With both of these PRs:-

  1. An error is displayed to the user
  2. The version mismatch is reported in xrdp.log
  3. The X server continues to run.

Screenshot for a version mismatch:-

image

Corresponding xrdp.log:-

[2024-08-06T11:32:08.469+0100] [INFO ] [lib_mod_connect(xup.c:269)] lib_mod_connect: connecting via UNIX socket
[2024-08-06T11:32:08.469+0100] [INFO ] [lib_mod_connect(xup.c:304)] lib_mod_connect: connected to Xserver (Xorg) sck 29
[2024-08-06T11:32:08.469+0100] [INFO ] [lib_mod_log_peer(xup.c:79)] lib_mod_log_peer: xrdp_pid=80398 connected to Xorg_pid=80518 Xorg_uid=1001 Xorg_gid=1001 client=[::ffff:172.19.73.10]:32884
[2024-08-06T11:32:08.476+0100] [ERROR] [lib_mod_process_message(xup.c:1839)] Xorg module has version 20240806, expected 20240805
[2024-08-06T11:32:08.479+0100] [ERROR] [xrdp_wm_log_msg(xrdp_wm.c:2434)] xrdp_wm_log_msg: Error connecting to user session

@metalefty
Copy link
Member

I like the idea.

@metalefty
Copy link
Member

@matt335672 Let's merge this if this doesn't interrupt what we are working on now.

@matt335672
Copy link
Member Author

Thanks - I'll rebase and retest first.

This commit adds a stage into the Xorg connection status to wait for
the capabilities message from the Xorg server. This allows us to move
the xorgxrdp version check to xrdp from the X server for better
reporting to the user.
The mismatched versions are now displayed to the user rathe than being
buried in the log. This should aid fault reporting and help users find
distro-introduced problems with an Internet search.
@matt335672
Copy link
Member Author

One small change - I've displayed the version number mismatch for the user:-

image

This should help users triage problems introduced by distros, as an internet search may reveal the issue.

@matt335672 matt335672 merged commit a0989d9 into neutrinolabs:devel Nov 23, 2024
14 checks passed
@matt335672 matt335672 deleted the wait_for_xorg_caps branch November 23, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants