During developing a project I had to open multiple tabs in gnome-terminal, some of them as just output streams, others for the shell prompt.
Is their a way to automate this task.
Like running a script that automatically opens multiple terminals and run certain commands on each of them, and these terminals are displayed vertically or horizontally rather than in tabs ( or different windows ) like grid-display or something.
'Terminator' does exactly what I want, but I just can't configure it to work like what I want.
I don't get the 'Layout' thing
Here's part of my 'config' file:
[layouts]
[[default]]
[[[child1]]]
type = Terminal
parent = window0
position = left
[[[child2]]]
type = Terminal
parent = window0
position = left
[[[window0]]]
type = Window
parent = ""
When I run terminator, an error is printed out saying that I there's an incorrect number of children, and then 'terminator' appears normally with a single terminal.
I don't know what I'm doing wrong here, I would appreciate any help with 'Terminator' or with any tool that has the same functionality.
Thanks.
I think you have to try terminator a ruby gem that will help you to mange automation config files.
Terminitor automates your development workflow setup. Less time setting up, more time getting things done.
Also, an alternative is teamocil
Teamocil is a tool used to automatically create windows and splits in tmux with Ruby and YAML. Like tmuxinator, but with splits, not just windows.
Did you consider using 'screen' ? there is a 'split' command.
- "CTRL+a, S" (Capital S) to create a new tab
- "CTRL+a, Tab" to Switch to this tab
- "CTRL+a, c" to create a new screen in this tab
Well, I suggest you to forget terminator (coming from a looong time terminator user) and learn to use a terminal multiplexer like tmux. There's a gem called tmuxinator that lets you configure sessions with YAML, so it's really, really easy.
For tmux I suggest you to start with the book «tmux: Productive Mouse-Free Development» from Brian Hoogan.
I have been working on a shell script to do exactly what you need
https://github.com/vahidhedayati/terminator-win-splitter
chmod to 755
./termcon.sh -h
./termcon.sh -c {connects to existing layouts - press enter and it will list your existing layouts }
./termcon.sh -f filename.txt {connects to servers listing within filename.txt and stores layout }
./termcon.sh -l prod ta ce cex {LISTS auto discovered nodes for ce cex in production env which have tomcat or apache in naming } }
./termcon.sh -a prod ta ce cex {Connects to auto discovered nodes for ce cex in production env which have tomcat or apache in naming and stores layout}
I am still working on windows split, it is quite complex but for now it does a 4 window split with no issues, when it is working and i emailed again it will just be a case of
./termcon.sh -w 8 -a prod ta ce cex
./termcon.sh -w 8 -f file.txt
I would also recommend if calling via a file then to name files according to server naming convention since once a layout is stored it won't overwrite it