This is what I want to accomplish:
- I want to open a gnome terminal with five tabs in it
- I want to run a set of commands (5 – 10 commands) in each tab automatically
First tab: shall set clear-case view and after that execute one or more commands
Second tab: shall login into a server and execute some commands
Third tab: shall only execute some commands
gnome-terminal --geometry=260x25-0+0 --tab -e "csh -c \"ct setview myViewName; cal\"" –tab --tab --tab (works ok, view is set but no command executed after that)
I have tried to do it this way instead and running this in the script below:
gnome-terminal --geometry 125x18-0-26 --tab -t "some title" -e /home/ekido/Desktop/MyScripts/myScript #!/usr/bin/expect exec gnome-terminal --geometry 125x49-0+81 –tab spawn ssh usert@server expect "password" send "*******\r" expect "user@server100:~>" send “some command\r" expect "user@server100:~>" send “some command" interact
If I remove the
exec gnome-terminal --geometry 125x49-0+81 –tab rows from the example and call a script from some other file, it works fine -- I get logged in to the server and all commands executed. Can anyone help me solve this?
To write a script that I call for every tab is not an option, since I will have 5 terminals with 5-7 tabs in each in the end, and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).