Identifying XRDP session based on connection port without race conditions #3250
Unanswered
wesHawkeyeMaszk
asked this question in
Q&A
Replies: 1 comment
-
I can't think of a simple way to do this. Also:-
This seems to be incompatible with this FAQ. Am I misunderstanding something? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an XRDP server running on multiple ports (e.g., 3389, 3390, 3391). I want to execute different scripts or processes based on the specific port a user connects to. However, I'm facing challenges in reliably identifying the current session's connection port from within the session itself.
Current situation:
Multiple XRDP ports are active (3389, 3390, 3391, etc.)
Different processes need to be initiated based on the connection port
Multiple users may be connecting simultaneously but the trick is they will all be connecting to same user but each receive their own session. Thus i cannot different them by giving them each a unique login/user on the xrdp server machine.
Problem:
I can't rely on checking logs or using netstat to determine the connection port, as this could lead to race conditions when multiple users connect at the same time.
Question:
Is there a reliable method to identify which port an XRDP session is connected to from within the session itself, without risking race conditions? Ideally, I'm looking for a solution that:
Can be implemented in a shell script or similar
Works consistently even with simultaneous connections
Doesn't require modifying the XRDP source code (if possible)
I am aware of this post #2415 as well as #2221
Neither feels like it quite fits my use case
Any suggestions for approaches or existing tools that could help solve this problem would be greatly appreciated.
Environment:
OS: Ubuntu
XRDP version: 0.10.80
Beta Was this translation helpful? Give feedback.
All reactions