Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hplabsz!mayer From: mayer@hplabsz.HPL.HP.COM (Niels Mayer) Newsgroups: comp.windows.x Subject: Re: Starting remote xterms Message-ID: <2711@hplabsz.HPL.HP.COM> Date: 8 Dec 88 23:49:05 GMT References: <5345@polya.Stanford.EDU> <14904@mimsy.UUCP> Reply-To: mayer@hplabs.hp.com (Niels Mayer) Organization: Hewlett-Packard Labs, Software Technology Lab, Palo Alto, CA. Lines: 19 Summary: Expires: Sender: Followup-To: In article <14904@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >I use the following script (called `xrsh') to start commands on remote >machines. It leaves no extra processes, and exports DISPLAY to the >remote machine (which rsh does not). > >rsh $host -n "setenv DISPLAY $DISPLAY; exec $@ &/dev/null" FYI: There's one small problem with schemes that pass along $DISPLAY. On my workstation, I have my $DISPLAYs set to unix:0.0 and unix:0.1 so that local clients communicate with the server using unix domain sockets (giving a substantial speed improvement). Passing along unix:0.* to the remote host is of course meaningless, since the remote host expects `hostname`:0.*. In my scripts, I kludged around this problem by using a conditional that tests for the two possible cases that arise in my configuration. I didn't have the time or patience to coax sh into automatically replacing the substring "unix:" with "`hostname`:". That would of course be the "right" solution. -- Niels.