* DISPLAY on Alpha/OSF
@ 1995-05-09 4:00 John Benner
1995-05-09 4:00 ` Dan Pop
1995-05-10 4:00 ` Mike Yankus
0 siblings, 2 replies; 3+ messages in thread
From: John Benner @ 1995-05-09 4:00 UTC (permalink / raw)
Is there a way to automatically set the DISPLAY variable when logging
into a remote Alpha running OSF? I log into an Alpha frequently from
a variety of other machines (SGI's) and want to avoid manually
setting the display to the machine I am logging in from. Any help would
be appreciated.
On SGI's, the following code in your .login works:
if ($?DISPLAY == 0) then
if ($?REMOTEHOST) then
setenv DISPLAY ${REMOTEHOST}:0
else
setenv DISPLAY :0
endif
endif
But it does not work on the Alpha (because $REMOTEHOST is not set).
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: DISPLAY on Alpha/OSF
1995-05-09 4:00 DISPLAY on Alpha/OSF John Benner
@ 1995-05-09 4:00 ` Dan Pop
1995-05-10 4:00 ` Mike Yankus
1 sibling, 0 replies; 3+ messages in thread
From: Dan Pop @ 1995-05-09 4:00 UTC (permalink / raw)
In <3oof1s$bn7@newshost.lanl.gov> John Benner <benner> writes:
>But it does not work on the Alpha (because $REMOTEHOST is not set).
You can find out the name of the remote host by parsing the output of
"who -Mm".
Dan
--
Dan Pop
CERN, CN Division
Email: danpop@afsmail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DISPLAY on Alpha/OSF
1995-05-09 4:00 DISPLAY on Alpha/OSF John Benner
1995-05-09 4:00 ` Dan Pop
@ 1995-05-10 4:00 ` Mike Yankus
1 sibling, 0 replies; 3+ messages in thread
From: Mike Yankus @ 1995-05-10 4:00 UTC (permalink / raw)
In article <3oof1s$bn7@newshost.lanl.gov>, John Benner <benner> wrote:
>Is there a way to automatically set the DISPLAY variable when logging
>into a remote Alpha running OSF? I log into an Alpha frequently from
>a variety of other machines (SGI's) and want to avoid manually
>setting the display to the machine I am logging in from. Any help would
>be appreciated.
>
Here is what I use in my .profile file. It work for ALPHA OSF1, ULTRIX,
and some versions of SUN OS.
#
# set DISPLAY
#
if [ "$0" = "-ksh" ]
then
#
# FIXME: if you rsh from workstation A to server B, the DISPLAY is set
# correctly, however, if you then rsh from server B to server B (or to
# another workstation), then the display is set to server B,
#
HOST=${DISPLAY%%:*}
if [ -z "$HOST" ]
then
HOST=$(who am i | awk -F'(' '{ print $2 }')
HOST=${HOST%%\)*}
if [ -z "$HOST" ]
then
HOST=$(who -Mm | awk -F'(' '{ print $2 }')
HOST=${HOST%%\)*}
fi
if [ -z "${DISPLAY}" ]
then
DISPLAY="${HOST}:0.0"
fi
fi
export DISPLAY
fi
--
Mike Yankus INTERNET: Mike_Yankus@ITD.Sterling.COM
PRC Inc. 1410 Wall St. Phone: (402) 291-8300
Bellevue, NE. 68005-3687 FAX: (402) 291-4362
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-05-10 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-05-09 4:00 DISPLAY on Alpha/OSF John Benner
1995-05-09 4:00 ` Dan Pop
1995-05-10 4:00 ` Mike Yankus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox