Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-24-2010, 11:12 AM   #1
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 11:35 AM.
Old 11-24-2010, 02:33 PM   #2
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.


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 10:36 AM
GNOME:(Convenience) Any way to input shell commands without bringing up a terminal? kopatops Linux - Software 6 03-13-2010 05:05 PM
How to stop gnome terminal 2.16.0 suddenly switching to Japanese input gnreeke Linux - Newbie 3 06-03-2009 04:44 PM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 11:34 AM
Terminal Commands in Gnome connor Linux - Newbie 7 09-25-2003 10:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:21 AM.

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