Hi there,
I asked how can I setenv the DISPLAY automatically when rlogin.
I used the "who am i" command in the .cshrc to find the machine I
rlogined from and so to setenv the DISPLAY. However I got errors while
doing it on Solaris 2.5.
The answer I liked best was a simple one. use "last -1"
Answered by Terry Gorby <tgorby@emc.com>
Who wrote:
TRY:
set RHOST=`last -1 | awk ' { print $3 } '|sed -e "s/\..*//" `
setenv DISPLAY ${RHOST}:0.0
I tested it. It sure works.
Thanks Terry Gorby
I also got many other interesting answers starting from just use
"/usr/ucb/whoami", an answer which didn't help, All the way to a 2
miles script taken from the CDE.
Thanks a lot to everyone who answerd:
Terry Gorby <tgorby@emc.com>
Gary Merinstein <gmerin@panix.com>
pasken@thunder.slu.edu (Robert Pasken)
Nikos George <george@pop.psu.edu>
George Pallas <gpallas@freenet.columbus.oh.us>
vahsenr@ce.philips.nl (Vahsen Rob)
blackman@athens.dental.upenn.edu (David Blackman)
Kevin Davidson <tkld@cogsci.ed.ac.uk>
Jim Reisert <jjr@databook.com>
"Matt Hill" <MHILL@graver.com>
hxktb0@svho1ds_1.supervalu.com (Kris Briscoe)
iv08480@issc02.mdc.com (Colin Melville)
anderson@neon.mitre.org (Mark S. Anderson)
Mark Bergman <bergman@phri.nyu.edu>
Thanks a lot you all.
-- Harel --- Hareldv@netvision.net.il\||/ (`') _____||_____ (_____ _____) | | / \ | /\ | _/ | | \_ /___/ \___\
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:02 CDT