home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / admin / 4358 < prev    next >
Encoding:
Text File  |  1992-07-28  |  3.1 KB  |  62 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!darwin.sura.net!jvnc.net!princeton!phoenix.Princeton.EDU!dawagner
  3. From: dawagner@phoenix.Princeton.EDU (David A. Wagner)
  4. Subject: Re: rsh like command with rlogin environment
  5. Message-ID: <1992Jul28.210029.10916@Princeton.EDU>
  6. Originator: news@ernie.Princeton.EDU
  7. Keywords: rsh rlogin
  8. Sender: news@Princeton.EDU (USENET News System)
  9. Nntp-Posting-Host: phoenix.princeton.edu
  10. Organization: Princeton University
  11. References: <1992Jul28.154242.4135@ilinx.wimsey.bc.ca>
  12. Date: Tue, 28 Jul 1992 21:00:29 GMT
  13. Lines: 47
  14.  
  15. In article <1992Jul28.154242.4135@ilinx.wimsey.bc.ca> brian@ilinx.wimsey.bc.ca (Brian J. Murrell") writes:
  16. >I have this problem I'm sure other people have run into.  I want to be able
  17. >to do an rsh command to another machine in the office, but the command I want
  18. >to execute is interactive.  rsh doesn't work!!  However if I rlogin to the 
  19. >machine and then execute the command and then log out, this works (obviously).
  20. >
  21. >What I want to be able to do is rsh foo -l brian bar to execute command 
  22. >bar on machine foo, with id of brian, with the command bar being interactive.
  23. >
  24. >I figured what I really need is to be able to do rlogin foo -l brian bar.
  25. >Unfortunately, rlogin doesn't support having a command to run when the user
  26. >actually gets logged onto machine foo.
  27.  
  28.     Hear, hear!  I have wondered the same thing myself...  I can
  29.     think of 4 solutions, at least 1 of which is an ugly hack. :-)
  30.     I also have a few questions...
  31.  
  32. (1) Modify rsh so that instead of doing line-by-line buffering, it sends
  33.     each character as it is typed.  Note that, with this type of solution,
  34.     your .login/.profile file is never sourced.  Would in.rshd need to be
  35.     changed for this?
  36.  
  37. (2) Modify rlogin so that you can specify a command to run.  Might one get
  38.     away with only changing rlogin and not messing with in.rlogind?
  39.  
  40. (3) Combine the functionality of rsh and rlogin into one program with flags
  41.     to specify what size buffers to use, and whether to execute a program
  42.     right away or just start up an interactive shell.  This could take some
  43.     work -- but -- why did the original designers choose to seperate rsh
  44.     and rlogin in the first place?
  45.  
  46. (4) Use an shell script hack.  [Beware: I haven't tested this]  Create a
  47.     `myrlogin' shell script which rsh's over to the new machine, makes a
  48.     file (with a standard filename, under your home directory) which has
  49.     the name of the interactive command in it (for instance, vi)    Then
  50.     have the script do a rlogin.  Now make your .login/.profile check if
  51.     the standard file exists - if it does, exec the command named there
  52.     from your .login/.profile.  Whammo!  The new `myrlogin' shell script
  53.     *should* be useable in the form `myrlogin newhost -l me trn' or
  54.     somesuch.  Anyone see any problems with this approach?  (besides the
  55.     fact that its ugly :-)
  56.  
  57.     Any other ideas?  And most importantly, why CAN'T you specify an
  58.     interactive process to run remotely?  Is this a basic design issue?
  59.  
  60. --------------------------------------------------------------------------------
  61. David Wagner            dawagner@phoenix.princeton.edu (or wagner@nisc.jvnc.net)
  62.