Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!tinman.cis.ohio-state.edu!bob From: bob@tinman.cis.ohio-state.edu (Bob Sutterfield) Newsgroups: comp.windows.x Subject: Re: Figuring out the right DISPLAY variable when you rlogin. Message-ID: Date: 18 Apr 89 13:10:53 GMT References: <19688@iuvax.cs.indiana.edu> <2250@titan.sw.mcc.com> Sender: news@tut.cis.ohio-state.edu Organization: The Ohio State University Dept of Computer & Information Science Lines: 50 In-reply-to: janssen@titan.sw.mcc.com's message of 16 Apr 89 23:02:44 GMT These problems (trying to figure out DISPLAY over rlogin) are much simpler when the xterm itself is running on the remote system. It can get its DISPLAY at startup time, as when using an rXcmd script like: #!/bin/sh # rXcmd (suggested by John Robinson, jr@bbn.com) # (generalized for sh,ksh by Keith Boyer, keith@cis.ohio-state.edu) case $# in [01]) echo "Usage: $0 host x-cmd [args...]";; *) case $SHELL in *csh*) host="$1"; shift xhost "$host" rsh "$host" -n \ "(setenv TERM xterm; setenv DISPLAY `hostname`:0; \ $* & /dev/null &)" & ;; *sh) host="$1"; shift xhost "$host" rsh "$host" -n \ "(export TERM=xterm; export DISPLAY=`hostname`:0; \ $* < /dev/null > /dev/null 2>&1 &)" & ;; esac ;; esac The bit about setting DISPLAY to `hostname`:0 is a bit of a hack, but at least it works for both X10 and X11. DISPLAY locally will be something like "unix:0.0" which of course isn't too useful over a TCP-domain socket, so another approach is needed. Suggestions welcome... (I have a similar rPScmd for use in NeWS-land.) Some have suggested that in a resource-poor environment, running the xterm client on the remote system causes more of a load than would an rlogind or telnetd, because of the CPU and network overhead of managing life as a real X client, with exposure and mouse-entry events and such like that the VAX-11/730 or Cray (or whatever) shouldn't have to worry about. You just have to decide whether the remote system or your own workstation has more memory and cycles to spend on that sort of stuff, and work out the tradeoff in each particular case. Does anyone know the general answer: how do the network, memory, and CPU loads on the host compare between xterm, rlogind, and telnetd in a typical 4.3-like system?