xterm: how to open a new xterm and run telnet

xterm: how to open a new xterm and run telnet

Post by aja » Sat, 31 Jan 2004 17:54:45



Hi All,
In my work i need to access many servers. Each time i use the
following alias to create a xterm window and then do telnet.

alias black='xterm -cr red -ms blue -ls -rw -sb -sk -sl 200000 -T
"SERVER1" -bg black -fg white -vb -fn courr14 -geometry 70x30 &'

I want execute telnet command with xterm so that i don't have to type
telnet xyz
in new window.
I googled and found something like this

xterm -e telnet SERVER2

This works fine if i issue this command from the command line. But
when i put into alias it doesn't work. Just for a moment new xterm
window appears and then  disappears.

alias black='xterm -e telnet SERVER2 -cr red -ms blue -ls -rw -sb -sk
-sl
200000 -T "SERVER1" -bg black -fg white -vb -fn courr14 -geometry
70x30 &'

What's wrong with the above alias?

Tx
Ajay

 
 
 

xterm: how to open a new xterm and run telnet

Post by Stephane CHAZELA » Sat, 31 Jan 2004 20:22:14


2004-01-30, 00:54(-08), ajay:
[...]
Quote:> xterm -e telnet SERVER2

> This works fine if i issue this command from the command line. But
> when i put into alias it doesn't work. Just for a moment new xterm
> window appears and then  disappears.

> alias black='xterm -e telnet SERVER2 -cr red -ms blue -ls -rw -sb -sk
> -sl
> 200000 -T "SERVER1" -bg black -fg white -vb -fn courr14 -geometry
> 70x30 &'

> What's wrong with the above alias?

[...]

it runs telnet SERVER2 -cr red -ms ... in xterm.
Put the "-e" option last.

Note the "resource" mechanism in the xterm man page if you don't
want to issue all those options each time.

--
Stphane                      ["Stephane.Chazelas" at "free.fr"]

 
 
 

xterm: how to open a new xterm and run telnet

Post by aja » Fri, 06 Feb 2004 14:21:43



> 2004-01-30, 00:54(-08), ajay:
> [...]
> > xterm -e telnet SERVER2

> > This works fine if i issue this command from the command line. But
> > when i put into alias it doesn't work. Just for a moment new xterm
> > window appears and then  disappears.

> > alias black='xterm -e telnet SERVER2 -cr red -ms blue -ls -rw -sb -sk
> > -sl
> > 200000 -T "SERVER1" -bg black -fg white -vb -fn courr14 -geometry
> > 70x30 &'

> > What's wrong with the above alias?
> [...]

> it runs telnet SERVER2 -cr red -ms ... in xterm.
> Put the "-e" option last.

> Note the "resource" mechanism in the xterm man page if you don't
> want to issue all those options each time.

Mrci Stephen,
that works
One more question

How to get automatically login into the remote machine. The username
and password is same for all the machines.
My idea is to just issue one command (alias) and it will open a new
xterm window and login into the new server

 
 
 

xterm: how to open a new xterm and run telnet

Post by Barry Margoli » Fri, 06 Feb 2004 14:54:45




> How to get automatically login into the remote machine. The username
> and password is same for all the machines.
> My idea is to just issue one command (alias) and it will open a new
> xterm window and login into the new server

You'll need to write an expect script to do that.  Specify the expect
script name in the -e option to xterm, instead of the telnet command.

--

Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

 
 
 

xterm: how to open a new xterm and run telnet

Post by aja » Fri, 06 Feb 2004 22:09:58





> > How to get automatically login into the remote machine. The username
> > and password is same for all the machines.
> > My idea is to just issue one command (alias) and it will open a new
> > xterm window and login into the new server

> You'll need to write an expect script to do that.  Specify the expect
> script name in the -e option to xterm, instead of the telnet command.

Tx Barry,
gonna learn expect first :)