Pete O'Connell
2011-Aug-03 05:18 UTC
[CentOS] How to open several tabs in a gnome-terminal window and run a command in each tab?
"gnome-terminal --tab-with-profile=AAA --tab-with-profile=BBB" Hi I am trying to open several tabs in a gnome-terminal window like above. I want to run a command for each tab within the body of the above command. AAA and BBB are both profiles I have created and also predefined environment variable on my system (each representing a path to a folder). The code I was hoping would work was something like: "gnome-terminal --tab-with-profile=AAA -e='ls AAA' --tab-with-profile=BBB -e='ls BBB'" in order to list the folder contents within each tab, but no dice. Anyone know how to do this in a single command? Thanks Pete
John Doe
2011-Aug-03 11:04 UTC
[CentOS] How to open several tabs in a gnome-terminal window and run a command in each tab?
From: Pete O'Connell <pedrooconnell at gmail.com>> Hi I am trying to open several tabs in a gnome-terminal window like above. I > want to run a command for each tab within the body of the above command. AAA and > BBB are both profiles I have created and also predefined environment variable on > my system (each representing a path to a folder). The code I was hoping would > work was something like: > > "gnome-terminal --tab-with-profile=AAA -e='ls AAA' > --tab-with-profile=BBB -e='ls > BBB'" > > in order to list the folder contents within each tab, but no dice.I think the problem is more that it exits right away and does not seem to accept chained commands with ; or &&... Try with a full script with loops or something like watch: gnome-terminal --tab -e "watch ls /" --tab -e "watch ls /" JD
Possibly Parallel Threads
- How to sort using a predefined criterion
- [WISH / PATCH] possibility to split string literals across multiple lines
- [WISH / PATCH] possibility to split string literals across multiple lines
- sip.conf and SIP client host= not recognized in some cases
- [WISH / PATCH] possibility to split string literals across multiple lines