On Fri, Jun 01, 2001 at 11:34:51AM +0100, Andrew Nemchenko wrote:
> 
> I need a script that would do this for me:
> 
> xhost krypton
> rlogin krypton
> (enter login name)
> (enter password)
> export DISPLAY=my_ip_goes_here:0.0
> sunapp(an application that I need to run)
> 
> if some one could please write a script that can do this for me I would really
> apreciate it. I could probably do it my self but I left my bash book at home, and
> dont want to puts around the man pages.

Any particular reason not to use ssh?   With ssh properly setup,
all you'd have to do is "ssh kryton sunapp".  (Of course, you
may not have perms to setup ssh.)

Anyway, to do this right, you probably want to expect, instead of 
bash.  That's because entering login names and passwords requires
waiting till you're prompted for them.  That's a pain to do with
regualr shells, but its expects bread and butter.  So, do you
have expect available? I'd write the script, if you do.

-- 
Jim Crumley                  |
crumley at fields.space.umn.edu |
Work: 612 624-6804 or -0378  |