Path: utzoo!attcan!uunet!decwrl!mcnc!gatech!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: setenv DISPLAY automatically Message-ID: <9011112317.AA21302@Larry.McRCIM.McGill.EDU> Date: 11 Nov 90 23:17:26 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 36 > If one has many accounts on many UNIX machines running X-Windows, > naturally he doesn't want to do "setenv DISPLAY ..." every time he > rlogin to a host. How do you tell the remote host to know your > original "DISPLAY" and set it automatically for you when you log in? > We have figured out the way to do it for a single rlogin. But once > you rlogin to still another remote host, the DISPLAY becomes > incorrect. What I do is use a front-end to rlogin that packages up $TERM and $DISPLAY into a single string, which is stuffed into $TERM. rlogin then propagates $TERM normally; my .cshrc on the remote machine contains eval `xrlogind` where xrlogind is a program that checks $TERM and if it is of the special format it recognizes, unpacks it and spits out setenv and unsetenv commands to recreate the environment variables. Works like a charm, and xrlogin is smart enough to ensure that the DISPLAY it passes to the remote end is usable there, by always converting machine names to numeric form and handling the bare-":" and "unix:" abbreviations appropriately. The programs are not complicated, but they are not in shape to compile elsewhere; they depend on local include files and library routines (and also have an unfortunate assumption that the character set in use is ASCII). I can't spare the time just now to bash them into release-ready shape, but if you want them anyway you can ftp them from 132.206.1.1, in X/xrlogin.c and X/xrlogind.c. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu