Get Windows Terminal Server Session-ID
-
[quote author="Volker" date="1322786603"]Of course, both support multiuser environment.
I don't know what a Terminal Server ID is and what information it provides, so I have no clue what the equivalent on a Linux/Mac box is. What do you want to achieve?[/quote]
AFAIK, ther is not a Terminal server ID, it is a "Session ID". Typically, you have that on a terminal server, where multiple users can be logged ni at the same time. Windows 7 also supports multiple logged in users, but only part paralell (as they bust use the same console). So it's more the user session, which is also supported on Linux. But I don't know how to get a user session ID (token, whatever) on linux.
-
OS X is a bit special in that point. While it is a true multiuser OS, only one user can be logged in using the GUI at a given time. You can ssh to a remote Mac box, but you do not have access to the native GUI nor do you have an X Window system like networked GUI running on your local box. So, for native applications there's hardly a chance to be ran multiple times by different users (if you start it, it would pop up on the remote machine's screen).
On Linux using X11 (and other Unixes too), you can log in remotely to a box and have the GUI running on your local machine. The remote session can be identified by the DISPLAY environment variable. But watch out: If you open two ssh sessions, you get two different values for the DISPLAY variable. You may want to look at the USER env variable too, it contais the Unix name of the user running the current session, it's always the same, regardless of how often you're logged in.
-
[quote author="Stefan Walter" date="1323093420"]You can login in MacOS as well as Linux multiple times in parallel. They provide nowadays the feature to login with another user, without logout of the current user.[/quote]
But that is not the same as the terminal server session ID on windows
-
[quote author="Gerolf" date="1323093420"][quote author="Stefan Walter" date="1323093420"]That is not really true, you can login in MacOS as well as Linux multiple times in parallel. They provide nowadays the feature to login with another user, without logout of the current user.[/quote]
But that is not the same as the terminal server session ID on windows[/quote]
Thanks, yes that is correct. I know that the Terminal Server Session ID is not the same id as on Linux or MacOS.What i wanted to know is how to get any sort of id (numeric or alphanumeric) that is assigned per user session?
-
[quote author="Gerolf" date="1323172406"]In windows it's the session ID, as each logged in user has an own session (also multi logins on win7 have own sessions, but no terminal sessions).
However that works on Linux etc.[/quote]
Yes, but is there any environment variable other way to distinguish Linux sessions?