🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25540

Re: MAKEHOSTS - with xterms!

#25540
From: bob
Date: Wed, 06 May 1987 20:48
40 lines
2168 bytes
In article <8705052221.a004255@ivax.doc.ic.ac.uk> lmjm@doc.ic.ac.UK writes:
> ... A little shell script that does (effectively)
>	xterm -n "rlogin:remotehost" -e remotehost ...
> ...
>#! /bin/sh
>MC=`basename $0 | sed "s/^x//"`
>/usr/new/xterm -n "rlogin:$MC" -e $MC $*
> ...
>UKUUCP SUPPORT  Lee McLoughlin

I've noticed a lot of people do the sort of thing you suggest.  But
why not run the xterm (or any other) client on the remote host where
it belongs?  If you can rlogin to a host, then you can rsh on it,
which means you can have a little script called something like `rXcmd'
so you can say

	rXcmd host /usr/local/xterm

or, if you use GNU Emacs and want the full X interface,

	rXcmd host /usr/local/emacs

What is rXcmd?  It looks like:
----------------------------------------------------------------
#!/bin/sh
# rXcmd (suggested by John Robinson, jr@bbn.com)
case $# in
[01])	echo "Usage: $0 host X-cmd [args...]";;
*)	host="$1"; shift
	xhost "$host"
	rsh "$host" -n "(setenv TERM xterm; setenv DISPLAY `hostname`:0; $*)" &
	;;
esac
----------------------------------------------------------------
Thanks, John, for this nifty little bit.  It's the Right Way.
-=-
 Bob Sutterfield, Department of Computer and Information Science
 The Ohio State University; 2036 Neil Ave. Columbus OH USA 43210-1277
 bob@ohio-state.{arpa,csnet} or ...!cb{osgd,att}!osu-eddie!bob
 (614)292-7348 (office) or -0915 (operators) or -7325 (answering machine)
Technical Details
Message-ID: <3502@osu-eddie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbatt!osu-eddie!bob
References: <8705052221.a004255@ivax.doc.ic.ac.uk>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbatt!osu-eddie!bob
From: bob@osu-eddie.UUCP
Newsgroups: comp.windows.x
Subject: Re: MAKEHOSTS - with xterms!
Message-ID: <3502@osu-eddie.UUCP>
Date: Wed, 6-May-87 16:48:52 EDT
Article-I.D.: osu-eddi.3502
Posted: Wed May  6 16:48:52 1987
Date-Received: Fri, 8-May-87 05:28:40 EDT
References: <8705052221.a004255@ivax.doc.ic.ac.uk>
Sender: news@osu-eddie.UUCP
Reply-To: bob@osu-eddie.UUCP (Bob Sutterfield)
Distribution: world
Organization: The Ohio State University Dept of Computer & Information Science
Lines: 40
Keywords: rXcmd
Summary: put the client in its place