LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2010, 10:12 AM   #1
zensunni
Member
 
Registered: Feb 2008
Posts: 45

Rep: Reputation: 0
Script to input commands into gnome-terminal


I'm trying to get a script to open a gnome-terminal and input commands into it, just as you would typing them in. That way, I can automate commands using bash, even if the terminal is running a non-bash program like telnet, mysql, vim, etc.

So, for instance..

I would like to open telnet to connect to a mud (I'm aware of the security concerns) and input commands through a script.

This way, I can log in, enter name/password, and do some start-game stuff automatically.

This isn't just for a mud, though. I'd like to be able to script inputs for any terminal application... maybe automate vim, mysql, or whatever.

Last edited by zensunni; 11-24-2010 at 10:35 AM.
 
Old 11-24-2010, 01:33 PM   #2
josh.engelbrecht
LQ Newbie
 
Registered: Sep 2010
Location: Sioux Falls, SD
Distribution: Fedora/CentOS
Posts: 4

Rep: Reputation: 0
Have you looked into expect scripts? Whereas I have not tried using them to start a terminal session, I have use it to automate interactive installs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Terminal commands working in terminal but not in a script GreYFoXGTi Linux - Newbie 1 08-04-2010 09:36 AM
GNOME:(Convenience) Any way to input shell commands without bringing up a terminal? kopatops Linux - Software 6 03-13-2010 04:05 PM
How to stop gnome terminal 2.16.0 suddenly switching to Japanese input gnreeke Linux - Newbie 3 06-03-2009 03:44 PM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Terminal Commands in Gnome connor Linux - Newbie 7 09-25-2003 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration