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