Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Scriptable terminal program (http://www.linux-archive.org/gentoo-user/75293-scriptable-terminal-program.html)

Daniel D Jones 04-24-2008 11:41 AM

Scriptable terminal program
 
Is anyone aware of a scriptable terminal program? Requirements are that I
should be able to open the program from a script, create multiple tabs, name
the tabs, connect the tabs to a remote computer via FTP, run a login script
which reads the info coming from the remote computer and sends back the
appropriate response, and then leaves the connection open at a command line
prompt.

I can't seem to find anything which supports everything. I can't find any
way, for example, to open multiple Konsole tabs from the command line.
Thanks in advance for any suggestions.

--
gentoo-user@lists.gentoo.org mailing list

Rens 04-24-2008 11:50 AM

Scriptable terminal program
 
Daniel D Jones wrote:
Is anyone aware of a scriptable terminal program? Requirements are that I
should be able to open the program from a script, create multiple tabs, name
the tabs, connect the tabs to a remote computer via FTP, run a login script
which reads the info coming from the remote computer and sends back the
appropriate response, and then leaves the connection open at a command line
prompt.


I can't seem to find anything which supports everything. I can't find any
way, for example, to open multiple Konsole tabs from the command line.
Thanks in advance for any suggestions.




You might have some luck using screen together with a custom screenrc
config file like the one below:



## Screen settings
# Disable startup message
startup_message off
# Keep screen running if terminal detaches abruptly
autodetach on
# Increase scrollback buffer
defscrollback 10000
# Set statusbar
caption always "%{bw} %n %t %{kb}| %{wb}%W %= %D %Y-%m-%d %c:%s"
# Set title bar
termcap xterm hs@:cs=E[%i%d;%dr:im=E[4h:ei=E[4l
terminfo xterm hs@:cs=E[%i%p1%d;%p2%dr:im=E[4h:ei=E[4l
# Set default shell
shell bash

## Set some environment variables:
setenv DISPLAY ':0'

## Keybindings
# Key codes can be obtained by running cat > /dev/null and typing the
key combination

# Remove some default key bindings
bind .
bind ^
bind
bind h
bind ^h
bind }
# bind Shift+PgUp/PgDn
bindkey -m "^[[5;2~" stuff ^b
bindkey -m "^[[6;2~" stuff ^f

## Default screens to open on startup
#
screen -t "ws1" 0 ssh -l root 10.0.0.1
screen -t "ws2" 0 ssh -l root 10.0.0.2
screen -t "ws3" 0 ssh -l root 10.0.0.3
screen -t "ws4" 0 ssh -l root 10.0.0.4
select 0

--
gentoo-user@lists.gentoo.org mailing list

Neil Bothwick 04-24-2008 12:46 PM

Scriptable terminal program
 
On Thu, 24 Apr 2008 11:41:52 +0000, Daniel D Jones wrote:

> I can't seem to find anything which supports everything. I can't find
> any way, for example, to open multiple Konsole tabs from the command
> line.

dcop konsole-$PID konsole newSession


--
Neil Bothwick

In a country of free speech, why are there phone bills?


All times are GMT. The time now is 07:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.