Skip to main content
typo-fixes
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\r"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-- I get logged in to the server and all commands executed). So my question is, ifCan anyone can help me solve this?

To write a script that I call for every tab is not an option, since I will have a 5 5 terminals with 5-7 tabs in etcheach in the end, and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\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). So my question is, if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5-7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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).

fix a typo
Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

open gnome terminal with serveralseveral tabs and execute a few commands in every tab

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\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). So my question is, if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5  -7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

open gnome terminal with serveral tabs and execute a few commands in every tab

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\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). So my question is, if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5  -7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

open gnome terminal with several tabs and execute a few commands in every tab

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\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). So my question is, if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5-7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

improved formatting
Source Link
chaos
  • 49.3k
  • 11
  • 127
  • 147

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 --tabgnome-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 comand\r" expect "user@server100:~>" send “some command" interact

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 comand\r"
expect "user@server100:~>"
send “some command"
interact 

If I remove the “exec gnome-terminal --geometry 125x49-0+81 –tab”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). So my question is, if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5 -7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

Thanks in advanced!

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\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). So my question is if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5 -7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

Thanks in advanced!

This is what I want to accomplish:

  1. I want to open a gnome terminal with five tabs in it
  2. 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 comand\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). So my question is, if anyone can help me solve this?

To write a script that I call for every tab is not an option since I will have a 5 terminals with 5 -7 tabs in etch in the end and that means it would be 25 to 30 scripts to write (cost more than it helps in my problem).

Source Link
ekido
  • 181
  • 1
  • 1
  • 4
Loading