-
-
Couldn't load subscription status.
- Fork 1.7k
Close on reconnect #3567
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
Close on reconnect #3567
Conversation
4d0ed79 to
2d541d0
Compare
|
Although more testing is required, this PR is now feature complete. With a connected session:- $ xrdp-sesadmin -c=list Session ID: 3397 Display: :11 User: testuser Session type: Xorg Screen size: 1280x1024, color depth 24 Started: Fri Jul 18 11:41:37 2025 Start IP address: <snipped> Connection state: connected Connected client IP: <snipped> Connected client name: andelain Connection start time: Fri Jul 18 11:42:30 2025 when the session disconnects:- $ xrdp-sesadmin -c=list Session ID: 3397 Display: :11 User: testuser Session type: Xorg Screen size: 1280x1024, color depth 24 Started: Fri Jul 18 11:41:37 2025 Start IP address: <snipped> Connection state: disconnected Connection end time: Fri Jul 18 11:52:01 2025 Also, with this in #!/bin/sh
# Write procedures here you want to execute on reconnect
env | sort >/run/user/$(id -u)/reconnect.logI get the following variables in the reconnect.log:- There's clearly more that can be done in terms of improving the |
d075203 to
379c82e
Compare
This allows sesexec to send a reason for a connection close request to xrdp. xrdp is also updated to support server initiated disconnection sequences from [MS-RDPBCGR] 1.3.1.4, along with reporting a reason to the client for the disconnection.
sesexec can now tell the xrdp process to exit, and is aware when the xrdp process exits.
This name better matches the name from [MS-RDPBCGR]. Also, the size of the UTF-8 buffer allocated for the client name is not large enough for some of the names which could potentially be passed across in UTF-16 from the client.
on connection, client IP and name are passed from xrdp to sesman to sesexec, and then back to sesman again. xrdp-sesadmin can now access the connection data from sesman
379c82e to
159947c
Compare
|
The wiki is now updated with development and release wiki pages. The development pages describe the new interactions indroduced by this PR and #3547 |
Fixes #3543
Fixes #1188
Helps with #2765
The draft PR builds on #3547. It uses a new link between sesexec and xrdp to allow sesexec to request xrdp to exit if another client wishes to connect to the same session.
So, if I start a session with:-
and then connect to the same session from elsewhere with the same command, the first command is terminated with these errors (on FreeRDP version 3.16.0):-
The session which is now connected can reconnect to chansrv and so copy-paste and drive redirections work as expected.
I've kept this draft for now, as I'm still testing, and also:-
When this is done, I'm likely to merge #3547, followed by this one.