1 |
Daniel D Jones wrote: |
2 |
> Is anyone aware of a scriptable terminal program? Requirements are that I |
3 |
> should be able to open the program from a script, create multiple tabs, name |
4 |
> the tabs, connect the tabs to a remote computer via FTP, run a login script |
5 |
> which reads the info coming from the remote computer and sends back the |
6 |
> appropriate response, and then leaves the connection open at a command line |
7 |
> prompt. |
8 |
> |
9 |
> I can't seem to find anything which supports everything. I can't find any |
10 |
> way, for example, to open multiple Konsole tabs from the command line. |
11 |
> Thanks in advance for any suggestions. |
12 |
> |
13 |
|
14 |
You might have some luck using screen together with a custom screenrc |
15 |
config file like the one below: |
16 |
|
17 |
|
18 |
## Screen settings |
19 |
# Disable startup message |
20 |
startup_message off |
21 |
# Keep screen running if terminal detaches abruptly |
22 |
autodetach on |
23 |
# Increase scrollback buffer |
24 |
defscrollback 10000 |
25 |
# Set statusbar |
26 |
caption always "%{bw} %n %t %{kb}| %{wb}%W %= %D %Y-%m-%d %c:%s" |
27 |
# Set title bar |
28 |
termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l |
29 |
terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l |
30 |
# Set default shell |
31 |
shell bash |
32 |
|
33 |
## Set some environment variables: |
34 |
setenv DISPLAY ':0' |
35 |
|
36 |
## Keybindings |
37 |
# Key codes can be obtained by running cat > /dev/null and typing the |
38 |
key combination |
39 |
# Remove some default key bindings |
40 |
bind . |
41 |
bind ^\ |
42 |
bind \\ |
43 |
bind h |
44 |
bind ^h |
45 |
bind } |
46 |
# bind Shift+PgUp/PgDn |
47 |
bindkey -m "^[[5;2~" stuff ^b |
48 |
bindkey -m "^[[6;2~" stuff ^f |
49 |
|
50 |
## Default screens to open on startup |
51 |
# |
52 |
screen -t "ws1" 0 ssh -l root 10.0.0.1 |
53 |
screen -t "ws2" 0 ssh -l root 10.0.0.2 |
54 |
screen -t "ws3" 0 ssh -l root 10.0.0.3 |
55 |
screen -t "ws4" 0 ssh -l root 10.0.0.4 |
56 |
select 0 |
57 |
|
58 |
-- |
59 |
gentoo-user@l.g.o mailing list |