Skip to main content

I would like to obtain the workstation hostname when a user logs into a Linux system.  I had it available on our Solaris Unix server but not on our RHEL8 server.  We use this to identify a physical location and to associate network printers nearby.  I am able to get the workstation hostname when in Citrix and by using Accuterm and checking a Session clientname but it is not always present when directly on the network and wondered if it was somewhere else Available to Accuterm.  Where can I found out the PC workstation hostname and what other windows information like this might be available to harvest?

0097:             * Check for citrix environmental variable CLIENTNAME
0098:             SCRIPT = 'InitSession.Output Environ("CLIENTNAME") & vbCR'
0099:             CRT CHAR(27):CHAR(2):'P':SCRIPT:CHAR(13): ; INPUT CLIENTNAME: ;  IF CLIENTNAME # '' THEN CRT "<-ClientName"

I would like to obtain the workstation hostname when a user logs into a Linux system.  I had it available on our Solaris Unix server but not on our RHEL8 server.  We use this to identify a physical location and to associate network printers nearby.  I am able to get the workstation hostname when in Citrix and by using Accuterm and checking a Session clientname but it is not always present when directly on the network and wondered if it was somewhere else Available to Accuterm.  Where can I found out the PC workstation hostname and what other windows information like this might be available to harvest?

0097:             * Check for citrix environmental variable CLIENTNAME
0098:             SCRIPT = 'InitSession.Output Environ("CLIENTNAME") & vbCR'
0099:             CRT CHAR(27):CHAR(2):'P':SCRIPT:CHAR(13): ; INPUT CLIENTNAME: ;  IF CLIENTNAME # '' THEN CRT "<-ClientName"

Hi Rebecca,

To see what information is available from the client, open a command window on the client and type:  SET

That will show you all the environment variables available on the client (but note that your AccuTerm session may have a slightly different set - depending on how you log in). Then you can use any of those variable names in your script. For example, to get the client computer name, you would use the COMPUTERNAME variable.

HTH,

Brian