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

Reply via email to