re automatically configuring display variable ainman css itd umich edu andrew douglas inman writes does anyone out there know of a way to have a unix machine automatically set it s display variable to that of the xterm you re using when it s not the machine that s serving you x the best i ve been able to come up with has been a rather convoluted script that extracts your ip from the whos command and it frequently fails not to mention that it requires having your user name added to it andrew inman consultant itd consulting and support services ainman umich edu university of michigan from my own notes on this subject methods to automatically passwd authorization from one machine to another this also includes the problem of notifing the remote host of the current display that is being used use rsh rexec on the method in the xauth manual set up the your rhosts file in the home directory on the remote machine so that a password in not required to remotly execute commands xauth extract display rsh other xauth merge this method is also used by xrsh to pass authorization my vampire program also uses a variation however i wrap it as part of the remote command sequence eg xauth add auth included in this method is the use of xrlogin and xrsh to do this job for you these programs usally the newer ones that is allow you to pass a secified list of environment variables which includes the display and or a copy of the authorization code required the xon program available if enabled on sun machines will also pass environment variables as well as the current directory you will however be required to store the authority in such a variable for passing unless you are also have shared home directories warning environment variables and command line arguments are visible in ps listing with the appropiate flags as such passing authorization information in environment variables or as arguments is not recomended the recommended method as given in the manual shown above is safe from the view of other users wrap it as part of the term environment variable this method uses the fact that most remote command executors do pass the term environment variable to the remote host it is then a matter of an appropiate script in your remote login file to extract the information from the term environment variable and set up things appropiatly a version of the xrlogin script is available on the network which does this basically you change the term environment variable before the actual call to rlogin is performed to include your display and your authorization on the remote machine you then extract this information and return the term environment variable to normal before you use it for reseting or stty ing your terminal script for launching rlogin bin sh bin rl rlogin with display if n display then case display in display hostname display esac term term display xauth nextract display export term fi rlogin add to your cshrc or login if term then if echo term tr cd then echo term cut d f xauth nmerge setenv display echo term cut d f setenv term echo term cut d f endif endif xterm command to use xterm t hostname e bin rl hostname nfs write it to a file on a shared nfs partition you have access to note that if the home directories are nfs mounted then authorization is automatically passed hoever you will still have to pass your display environment variable via a file or other means ie login host echo display x host remote host setenv display cat x host finger for the info in a plan file this involves encrypting the information into your plan or project and having the remote machine finger for the information this has the disadvantage of having the information to anyone fingering the user thus requiring a encryption method that is uniq to each individual ie the method of decyrption must not be shared or known by others nor should it be easy to determine a improvment is to use the who fingered me technique to only give the information only to your own remote accounts and not just to anyone who is asking this last method was developed last year by a second year here untill i explained to him the need for the encryption at which point he gave up this method it is however a valid method it is easer than but less secure anthony thyssen sysprog griffith university anthony cit gu edu au magic is real unless declared an integer john p melvin
