This seems like a typical use-case yet I can't find a way to do it- I created a layout having multiple windows. I want each window to open an SSH session to a different server.
2 Answers
- Go to the Layout tab in the configuration dialog,
- Select your layout
- In the terminal in the tree view in the middle, select your first terminal, select your profile and enter at the right the "custom command"
- Repeat step 3 for all your terminals where you want to run a special command at startup.
Use always the same layout and the same profile.
When done click on close and quit terminator.
When starting terminator again give the layout and the profile as command line option.
ie. terminator -l Layout1 -p Profile1
If you always want this, add an alias to .bashrc
.
-
8I've tried setting custom directory and command through both UI and config file and none of the methods works for me. directory is simply ignored. Custom command will crash terminator or profile configuration.– yuranosFeb 20, 2017 at 1:05
-
8@yuranos87 try to open config file
~/.config/terminator/config
and add command to one of theTerminal
sections:command = cd /some/folder; bash
Oct 10, 2017 at 9:40 -
2Anything I put in 'command' causes a runtime error when terminator is loaded up the next time with the specified layout. It also corrupts the layout entry in the config file by adding too many windows and terminals. I'm running debian if that makes a difference.– atreeonJan 4, 2019 at 15:26
-
3It is very important to add
; bash
or; zsh
(depending on your shell) after each custom command in your layout. Then it works fine and opens all windows. Without it terminator might open only one window.– lukeApr 9, 2019 at 8:27 -
The section is called custom_command. Fedora 31 here and it doesn't really work one way or the other. It just ignores the command but sets the correct background. Jan 13, 2020 at 12:57
I worked with this for a while, and the ; bash advice is correct. One other piece of advice is after entering the custom commands in the Profiles area of Preferences, if you click Save, it will wipe out all of the custom commands. If you enter the custom commands and simply close the preferences window, the preferences are preserved.