Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GUI Telnet Client for Linux

Status
Not open for further replies.

dmazzini

Programmer
Jan 20, 2004
480
0
0
US
Hi guys
I am looking for a Telnet Client “program that runs on Linux Red Hat. Let me give you more details.
There is a Linux computer that can access some Telecommunications Equipments (Radio Network Controller “RNC”) via telnet. I have a txt file with some proprietary commands that I have to send to this RNC. Some of the commands needs confirmation for the equipment to be executed, sometimes we will send multiple commands, sometimes just one command. (one line)
I was thinking to create a perl app with a gui to be able to read my txt file with commands, then when you select the the line with the file you can send it the equipment , something like this:

Main window. (Contains 2 windows)
1st window (top section open the file with commands)
2nd windows (bottom section, need to emulate xterminal, meaning that I have to be able to type in cmds or receive commands from the 1st window.
I might be able to do it using Tk,, Net::Telnet and Expect Module. But I don’t want to reinvent the wheel. Is there any application like that available in the Net. Any advises are highly appreciated.
Thanks

dmazzini
GSM/UMTS System and Telecomm Consultant

 
In similar telecom env I created a web access with commands = (radiobutton or checkboxes) and then script with Net::Telnet to execute them?

Is GUI a must?
 
Actually GUI is a must since people have to see the file with commands and in other windows (xterm) be able to provide answers to some cmds if needed or type some other command that may not be present in the file. The other reason is that I am not root user, i have just access to read and write to my home directory, so setup a web access might be more difficult.

Actually GUI is not a problem. I already created the interface using Tk. A window with two areas, at the top people can see the file, at the bottom I inserted xterm window into a frame. Below part of the GUI.


Code:
# bottom of the window showing xterm

my $xtermContainer = $main_frame->Frame(-height=>400,-width=>300,-container => 1,-background=>'white',-foreground=>'black',)->pack(-side=>'bottom',-fill=>'both',-expand=>1);

my $xtid = $xtermContainer->id();
$xtId = sprintf hex $xtid;


my $fg = "black";
my $bg = "beige";
system("xterm -title \"XXXXX\" -bg $bg -fg $fg -cr $fg -bd beige -sl 10000 -fn -adobe-*-*-r-normal--9-176-70-63-m-110-iso8859-1 -geometry 177x25 -into $xtId  &");


# top of the window showing Text where file with cmds will be displayed
                                
$text = $right_frame=$main_frame->Scrolled('Text',-background=>'white',-foreground=>'blue',-relief => 'groove',-scrollbars=>'se')->pack(-side=>'bottom',-fill=>'both',-expand=>1);

it works very well, when script is executed, tk shows the shell prompt (xterm)

Now,another challenge is communicate the 2 windows (text and xterm). I have to be able to send the text selected to the xterm window and execute it there. Any ideas about intercomunication process?

What do you think about use IPC::Open2 module

Code:
$pid = open2( \*Reader, \*Writer, etc...)




dmazzini
GSM/UMTS System and Telecomm Consultant

 
Wish I could help, but never had a need to use the module, yet :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top