From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,674f735b36ac5ffe X-Google-Attributes: gid103734,public X-Google-Thread: fee84,674f735b36ac5ffe X-Google-Attributes: gidfee84,public X-Google-Thread: 1070f0,674f735b36ac5ffe X-Google-Attributes: gid1070f0,public X-Google-ArrivalTime: 1994-10-04 09:54:23 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!monnier From: monnier@di.epfl.ch (Stefan Monnier) Newsgroups: comp.windows.x,comp.sys.sun.admin,comp.unix.osf.osf1 Subject: Re: Any script for setting the DISPLAY variable? Date: 4 Oct 1994 16:16:11 GMT Organization: Ecole Polytechnique Federale de Lausanne Distribution: usa Message-ID: <36rv4b$fnk@info.epfl.ch> References: <35s3f6$4es@bigdog.fred.net> NNTP-Posting-Host: didec4.epfl.ch Xref: bga.com comp.windows.x:12203 comp.sys.sun.admin:16835 comp.unix.osf.osf1:3861 In article <35s3f6$4es@bigdog.fred.net>, wrote: > I rlogin to HP, DEC Alpha OSF1, Sun systems. I have had > some script in .login which would set the DISPLAY variable. > But it uses the 'whoami' command to find out from which > system I have logged in. Unfortunately the output of > whomai is not the same on all these systems. Was wondering > if you folks have some script which would set the DISPLAY > environment variable correctly on ALL systems. Well, GNU who is the same no matter the platform, so you can choose GNU who instead of the standard one. Or you can choose a clever extracting function (that works with all the different format used by the different whos). But of course, the best suggestion I have is to switch to tcsh-6.05 which has a REMOTE env var which does exactly what you want ! Stefan PS: ultimately, the best solution is to telnet instead of rlogin and hope the telnets are recent enough to include the "last" extensions: this allows you to pass any env var to the remote host (as is always done for TERM). This way, the DISPLAY var is kept correct even if you log from X to Y to Z (in which case the "who" thing would try to display on Y)