home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / bash / bug / 498 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.5 KB  |  52 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!odin.ins.cwru.edu!chet
  3. From: chet@odin.ins.cwru.edu (Chet Ramey)
  4. Subject: Re: rsh, rcp with bash
  5. Message-ID: <9207241236.AA02088.SM@odin.INS.CWRU.Edu>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: chet@po.cwru.edu
  8. Organization: GNUs Not Usenet
  9. References: chet@odin.ins.cwru.edu (Chet Ramey)
  10. Distribution: gnu
  11. Date: Fri, 24 Jul 1992 04:36:22 GMT
  12. Approved: bug-bash@prep.ai.mit.edu
  13. Lines: 37
  14.  
  15. > I wonder whether this problem has been beaten to death in this group 
  16. > before.  I use bash 1.12.1  as login shell on my machines (Sun Sparcs 
  17. > running SunOS 4.1.1) and having problem with rsh and rcp. The symptoms
  18. > are as follows:
  19. >     host1>  rcp localfile host2:remotefile
  20. >     stty: TCGETS: Operation not supported on socket
  21. >     host1>  rsh host2 ls
  22. >     stty: TCGETS: Operation not supported on socket
  23.  
  24. I'll bet you have something that does output or manipulates the terminal
  25. state in your .bashrc.  Bash attempts to source the .bashrc for non-
  26. interactive shells running rsh and rcp so things like $PATH get set.
  27.  
  28. What you should probably do is to make your .bashrc look like this:
  29.  
  30. unset INTERACTIVE
  31. case "$-" in
  32. *i*)    INTERACTIVE=on ;;
  33. esac
  34.  
  35. ... initialization for all shells, interactive or not ...
  36.  
  37. if [ -z "$INTERACTIVE" ]; then
  38.     return
  39. fi
  40.  
  41. ... initialization for all interactive shells ...
  42.  
  43. Chet
  44.  
  45. --
  46. ``The use of history as therapy means the corruption of history as history.''
  47.     -- Arthur Schlesinger
  48.  
  49. Chet Ramey, Case Western Reserve University    Internet: chet@po.CWRU.Edu
  50.  
  51.