The program takes the options -screen (the default), -room (print room number), -printer (closest printer), -all (all of these options). If the option starts with +, it is removed from the list. E.g.
getscreen -all +roomwill print screen and printer, e.g.
fluor hp5
The option -verbose can be used to get some explanatory text in the output, like:
Screen: fluor Printer: hp5
All options can be abbreviated.
A useful application of this utility is the following: a user might include in his/her .login file:
setenv PRINTER `getscreen -printer` echo "Default printer is '$PRINTER'"This will ensure that the printer closest to the user's screen is used, in stead of the system default (which, currently, is the printer closest to the workstation console).
For other environments, other tricks are used.
The first method is to look in the list of most recent logins, using
last (/etc/last -R on HP) and search for the right
user name - tty combination. This will usually give the source of the login,
e.g. the name of a PC or the machine you did a rlogin or
telnet from.
However, this will not work in many cases, since it can only trace one step
back in a chain of rlogins. It is highly recommended to use
getscreen only in combination with
Rlogin, the enhanced version of
rlogin available in Sfinx. Or, on a PC, open a new session
on another machine, in stead of using rlogin or
telent from one workstation to another.