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

Need client name / IP address after login for license, printer assignment, .env, etc #2627

Open
sibelle-labs opened this issue Apr 7, 2023 · 1 comment
Labels

Comments

@sibelle-labs
Copy link

Hello!
In our environment, we need to know the IP address of the client that is doing the initial session setup.
Our HW Clients: Thin Clients, Windows Clients with rdp, etc.
Servers: Almalinux / xfce and of course xorgxrdp
So far we have used a script under xinitrc.d and from it, for example, the name of the nearest printer from the client name / IP address, the license assignament, etc.
After switching to xrdp and running xfreerdp on the clients (directly from rc.local) and from windows clients (with native rdp) we no longer have access to this information and are forced to hard-code such information in the user's .profile but again not reliably enough.

It would be cool if /etc/reconnectwm.sh also had access to the reconnecting client's IP address.
In this case, we could even update this information in a file in the user's home directory.

Reading into log files is cumbersome (and the information isn't there anyway)
xrdp-sesadmin is useless as it requires authentication even if you only need information about your own session

I've read that something has already been implemented in one place or another.
Can I access the information as it stands, even if I use a workaround for it?
The important thing in my environment would be if I had the IP address in the environment variables somewhere after logging in, for example.
Thanks in advance, and grateful for hints.

@matt335672
Copy link
Member

Duplicate of #2415 (or at least very similar) and #1348.

@sibelle-labs - we're working on this, but it isn't there yet. Using the environment isn't a great idea in general, as a session variable can't be changed once it's set. Although it will work OK for your use-case, we will doubtless end up with users getting confused when the IP address of a reconnected client is not the same as the one which started the session.

I'm hoping to make this information available from xrdp-sesadmin. This utility isn't useful for v0.9.x as you need a username and password to use it, but in the devel stream this is not longer necessary. Eventually you'll be able to query xrdp-sesadmin for the initial client IP address, current client IP address, and current connection state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants