home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3739 < prev    next >
Encoding:
Text File  |  1992-09-01  |  2.7 KB  |  68 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!iscnvx!rahner
  3. From: rahner@iscnvx.lmsc.lockheed.com (Mark Rahner)
  4. Subject: rshing Ultrix xterms
  5. Message-ID: <1992Sep1.192315.24302@iscnvx.lmsc.lockheed.com>
  6. Organization: Lockheed Missiles and Space Co.
  7. X-Newsreader: Tin 1.1 PL4
  8. Date: Tue, 1 Sep 92 19:23:15 GMT
  9. Lines: 57
  10.  
  11. Hello World,
  12.  
  13. I am having trouble rshing an xterm when the remote xterm is started
  14. under Ultrix V4.2 (Rev. 96) UWS V4.2 (Rev. 272).  Specifically, I can't
  15. prevent rsh from hanging around until the remote xterm has completed.
  16. I am using the Korn shell on all of the networked systems.  It is
  17. particularly important to me that the remote xterm be independent of
  18. the local xterm.  That is, I must be able to terminate the local xterm
  19. without affecting the remote xterm.
  20.  
  21. And now, a preemptive quote from FAQ 3.2:
  22. >
  23. > 2)  How do I use "rsh" without having the rsh hang around until the
  24. >     remote command has completed?
  25. >
  26. >     (stuff deleted)
  27. >
  28. >     If you use sh on the remote machine:
  29. >
  30. >         rsh machine -n 'command >/dev/null 2>&1 </dev/null &'
  31. >
  32. >     Why?  "-n" attaches rsh's stdin to /dev/null so you could run the
  33. >     complete rsh command in the background on the LOCAL machine.
  34. >     Thus "-n" is equivalent to another specific "< /dev/null".
  35. >     Furthermore, the input/output redirections on the REMOTE machine
  36. >     (inside the single quotes) ensure that rsh thinks the session can
  37. >     be terminated (there's no data flow any more.)
  38. >
  39. >     Note: The file that you redirect to/from on the remote machine
  40. >     doesn't have to be /dev/null; any ordinary file will do.
  41. >
  42. >     In many cases, various parts of these complicated commands
  43. >     aren't necessary.
  44.  
  45. When rshing to RS/6000s, SGIs, and AIX/ESAs, the following works great:
  46.  
  47.   rsh remote_host \
  48.     "/usr/bin/X11/xterm -ls -display $DISPLAY </dev/null >/dev/null 2>&1"
  49.  
  50. Notice that I didn't use rsh's -n option and I didn't put the remote
  51. xterm in the background.  This even works when I rsh FROM an Ultrix box
  52. to something else.  However, if I try to rsh TO an Ultrix box from
  53. anywhere, even an Ultrix box, I have no luck regardless of how I mangle
  54. the command.  The only way that I have been able to get this to pop a
  55. usable remote xterm without hanging the local xterm is to put rsh (not
  56. the xterm) into the background.  This results in an rsh that hangs around.
  57.  
  58. Am I doing something wrong?  Is Ultrix doing something wrong?  Does
  59. this happen to you too?  Any ideas would be greatly appreciated.
  60. Thanks in advance.
  61.  
  62. P.S.  What should I expect from a machine that doesn't even ship with
  63.       a Standard C compiler?  Does DEC do this to be compatible with
  64.       VMS?  :-)  Who buys these things for us, anyway?
  65.  
  66. -- 
  67. Mark V. Rahner   rahner@lmsc.lockheed.com
  68.