Kicking off multiple gnome terminals from a korn shell script
Submitted by gpmilliken on Wed, 11/24/2010 - 15:45
This script kicks off one terminal window (blue) then a bunch of additional terminal windows in tabs.
When they open up, a command is executed _as noted by the -e=
In this case the command is to run an ssh session against a given host
gnome-terminal -t="bongo" --tab-with-profile-internal-id=blue gnome-terminal -e="ssh oracle@emsdb2" -t="emsdb2" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@emsdb3" -t="emsdb3" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@emsdb4" -t="emsdb4" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@es220-1" -t="es220-1" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@grndb" -t="grndb" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@knkdb" -t="knkdb" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@kprptdb" -t="kprptdb" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@lnxdb1" -t="lnxdb1" --tab-with-profile-internal-id=yellow --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@prdlnxdb1" -t="prdlnxdb1" --tab-with-profile-internal-id=yellow gnome-terminal -e="ssh oracle@w53” -t="w53" --tab-with-profile-internal-id=yellow
Notice that we can set the color of the terminal and specify that the terminal is a tab within the existing window, not a separate window unto itself.
»
- gpmilliken's blog
- Login to post comments