🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.misc
Article #192

Re: How can I rlogin with the DISPLAY envar propagated?

#192
From: John Gerth
Date: Fri, 08 Jan 1993 02:46
41 lines
2101 bytes
Instead of using 'rlogin', you can use 'rsh' to start an 'xterm'
on the target system propagating your current DISPLAY variable.
Since the new 'xterm' will be operating against the server at
the DISPLAY variable all the customizations will apply.

Now there are lots of ways to do this.  Attached is a 'ksh' script
I use to do it on Irix 4.0.5 and which may well need to be customized
to your own tastes:
*-*-*-*-* cut here *-*-*-*
#!/bin/ksh
#
#  start a remote xterm with args, e.g. "rx over_there -bg seagreen ...."
#
#  $1 has the remote host name 
#

rx=$1; shift;
# I usually run with 'xhost +'. If you do too, comment out the following
xhost +$rx

# use /usr/bsd/hostname to get current host. An alternative is to use
#  an environment variable with your normal home workstation.  The latter
#   permits one to use this script again from 'rx'
#   
xh=`hostname`

# now spawn the login  
rsh $r . .profile \; xterm -ls -display $xh:${DISPLAY#*:} $* &

# NOTES:
#  (1)  running .profile gets the PATH, etc. setup over there
#           but assumes that one uses bsh or ksh on the remote.
#  (2)  The goop with DISPLAY handles the general case of
#          X display names, e.g. on multi-headed systems where
#          it can look like "unix:1.2".  We only want the "1.2".

*-*-*-*-* cut here *-*-*-*


-- 
John Gerth	 gerth@watson.ibm.com		(914) 784-7639
Technical Details
Message-ID: <1993Jan08.024656.34352@watson.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!sdd.hp.com!saimiri.primate.wisc.edu!ames!agate!linus!philabs!acheron!scifi!watson!yktnews!admin!minnie!gerth
References: <1993Jan8.000124.1271@sol.ctr.columbia.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.sgi.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!sdd.hp.com!saimiri.primate.wisc.edu!ames!agate!linus!philabs!acheron!scifi!watson!yktnews!admin!minnie!gerth
From: gerth@watson.ibm.com (John Gerth)
Subject: Re: How can I rlogin with the DISPLAY envar propagated?
Sender: news@watson.ibm.com (NNTP News Poster)
Message-ID: <1993Jan08.024656.34352@watson.ibm.com>
Date: Fri, 08 Jan 1993 02:46:56 GMT
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
References: <1993Jan8.000124.1271@sol.ctr.columbia.edu>
Nntp-Posting-Host: minnie.watson.ibm.com
Organization: IBM T.J. Watson Research Center
Lines: 41