home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!iscnvx!rahner
- From: rahner@iscnvx.lmsc.lockheed.com (Mark Rahner)
- Subject: rshing Ultrix xterms
- Message-ID: <1992Sep1.192315.24302@iscnvx.lmsc.lockheed.com>
- Organization: Lockheed Missiles and Space Co.
- X-Newsreader: Tin 1.1 PL4
- Date: Tue, 1 Sep 92 19:23:15 GMT
- Lines: 57
-
- Hello World,
-
- I am having trouble rshing an xterm when the remote xterm is started
- under Ultrix V4.2 (Rev. 96) UWS V4.2 (Rev. 272). Specifically, I can't
- prevent rsh from hanging around until the remote xterm has completed.
- I am using the Korn shell on all of the networked systems. It is
- particularly important to me that the remote xterm be independent of
- the local xterm. That is, I must be able to terminate the local xterm
- without affecting the remote xterm.
-
- And now, a preemptive quote from FAQ 3.2:
- >
- > 2) How do I use "rsh" without having the rsh hang around until the
- > remote command has completed?
- >
- > (stuff deleted)
- >
- > If you use sh on the remote machine:
- >
- > rsh machine -n 'command >/dev/null 2>&1 </dev/null &'
- >
- > Why? "-n" attaches rsh's stdin to /dev/null so you could run the
- > complete rsh command in the background on the LOCAL machine.
- > Thus "-n" is equivalent to another specific "< /dev/null".
- > Furthermore, the input/output redirections on the REMOTE machine
- > (inside the single quotes) ensure that rsh thinks the session can
- > be terminated (there's no data flow any more.)
- >
- > Note: The file that you redirect to/from on the remote machine
- > doesn't have to be /dev/null; any ordinary file will do.
- >
- > In many cases, various parts of these complicated commands
- > aren't necessary.
-
- When rshing to RS/6000s, SGIs, and AIX/ESAs, the following works great:
-
- rsh remote_host \
- "/usr/bin/X11/xterm -ls -display $DISPLAY </dev/null >/dev/null 2>&1"
-
- Notice that I didn't use rsh's -n option and I didn't put the remote
- xterm in the background. This even works when I rsh FROM an Ultrix box
- to something else. However, if I try to rsh TO an Ultrix box from
- anywhere, even an Ultrix box, I have no luck regardless of how I mangle
- the command. The only way that I have been able to get this to pop a
- usable remote xterm without hanging the local xterm is to put rsh (not
- the xterm) into the background. This results in an rsh that hangs around.
-
- Am I doing something wrong? Is Ultrix doing something wrong? Does
- this happen to you too? Any ideas would be greatly appreciated.
- Thanks in advance.
-
- P.S. What should I expect from a machine that doesn't even ship with
- a Standard C compiler? Does DEC do this to be compatible with
- VMS? :-) Who buys these things for us, anyway?
-
- --
- Mark V. Rahner rahner@lmsc.lockheed.com
-