163

Terminator is very powerful at organizing several computers or servers due to the split window and group all function. But here's the deal: I created my own Layout and would appreciate it to load at startup of terminator. Is that possible?

Braiam
  • 66,947
  • 30
  • 177
  • 264
zulu34sx
  • 2,101
  • 4
  • 16
  • 21
  • 1
    Can you post your `~/.config/terminator/config`, or at least everything below `[layouts]`? – pconley Jul 01 '12 at 06:10
  • Hi... There is no Folder ~/.config/terminator. – zulu34sx Jul 05 '12 at 20:37
  • If you have a running command in your layout, terminator need a few seconds for drawing layout. Add a line as `sleep 1` in your shell script. –  Dec 12 '13 at 08:21
  • open config file `~/.config/terminator/config` and edit `command = cd /some/folder; bash`. then save it and reopen the terminator. – suhailvs Feb 11 '19 at 04:04

8 Answers8

209
  1. After setting up your layout, right-click on any terminal background and choose PreferencesLayouts tab and click on Add button.

  2. Give it a name and hit Close.

  3. This should create the mentioned ~/.config/terminator/config file.

  4. Now you can start terminator using the saved layout using: terminator -l yourLayout (replace yourLayout with whatever you chose on step 2).

  5. (optional) Edit the ~/.config/terminator/config file so that where it says [layouts] and nested below it [[yourLayout]], rename yourLayout to default and remove/rename the previous default layout. Now, when Terminator starts without any parameters, it will load your custom [[default]] layout!

  6. (optional) Edit the [[[terminalx]]]/ command = a custom command;bash eg: command = ssh user@IP;bash (ending with bash) for each terminal, so that it will run your custom command during startup!!

mhnagaoka
  • 2,191
  • 2
  • 13
  • 9
  • 2
    I guess there is no way to make it remember also the paths where each window is when being saved? – JussiR Mar 19 '14 at 10:24
  • The flags suggested by @Patrick on his [answer below](http://askubuntu.com/a/431249/56496) solves the layout issues on my first commend. – mhnagaoka Apr 05 '14 at 14:24
  • 9
    Reame new layout name to "default" to start automaticaly – momo2047 Jun 26 '14 at 14:02
  • 5
    6. Set a custom initial command for each window. =) http://askubuntu.com/questions/349385/how-to-start-terminator-with-a-custom-command-per-window – vmassuchetto Apr 15 '15 at 08:27
  • 1
    This works well for tabs and windows, but for some reason 'directory' and 'command' properties in config file don't function properly. At the very least I want Terminator to launch in a specific folder. --working-directory flag works as expected, but it will not allow me to specify a dir of my choice to every tab in my custom layout. – yuranos Feb 20 '17 at 00:51
  • 1
    Any way to save the layout from a shell command? – Zioalex Jul 03 '17 at 09:57
  • 1
    This was the only thing that worked for me. The current accepted answer does not work. – jtsmith1287 Aug 06 '18 at 18:07
  • In my case, after just installing Terminator for the first time, when clicking "Add" in the Layouts tab, nothing happens. Not sure why... – Ryan Oct 04 '19 at 16:10
  • It does not work. This is even commented in the documentation. The documentation recommends creating the profile first, saving it, closing and opening it again and then add the custom commands without saving (?) Editing the config also works, which is why I found this question because I couldn't recall the path, LOL – runlevel0 Aug 17 '22 at 09:36
  • Needs an option to set default to user-preferred layout. – Casonade Dec 18 '22 at 21:03
45

There is a very easy way to accomplish this:

  • Open Terminator
  • Right click -> Preferences
  • In the Layouts tab (to the right of the Profiles tab), edit the default one, you will see that it says Window | window0 and Terminal | child1.
  • For the Terminal | child1, you can set: a Profile (to choose from the installed ones), a Default command, and a Working directory.
  • Set it/them to whatever you like, close, reopen again...
  • ... and voilá!

Hope this helped!

Noctumsempra
  • 590
  • 5
  • 4
  • 16
    Important: Follow these steps *exactly* and it works. Bizarrely, if you click "Save" after setting a Custom command and/or Working directory, it won't work. Clicking Save seems to clear anything you entered for Custom command and Working directory. – trebormf Mar 18 '19 at 14:02
  • 3
    This does not even answer the question. The question is about changing the default layout, not changing the profile for specific terminals in a layout. – Fritz Jun 18 '19 at 11:16
  • 3
    I've flagged it as it does not answer the question even though it is marked as such. I think for the sake of a strong community it is vital that the answer, even if it helps the original questioner, also helps the community. This answer does not. – SeveQ Jun 28 '19 at 11:20
  • The question is about setting user-preferred layout as default during startup. This is not the solution! – Casonade Dec 18 '22 at 21:07
24

After saving your layout (as per mhnagaoka's answer), you can make your changes used by default by editing the config file.

Edit the ~/.config/terminator/config file and look for where it says [layouts]. It should look something like this:

[layouts]
  [[default]]
    # ..default layout
  [[yourLayout]]
    # ..your custom layout

Rename [[yourLayout]] to [[default]] and remove/rename the previous default layout. Now, when Terminator starts without any parameters, it will load your custom default layout!

muru
  • 193,181
  • 53
  • 473
  • 722
ohanhi
  • 351
  • 2
  • 4
20

I use the method mhnagaoka suggested, but I made it usable from the launcher in Unity. I also had an issue with plain terminator -l my_default command, so specify these additional flags

  • -b for borderless and
  • -m for maximized.

The final Command is terminator -m -b -l my_default.

Now you need to modify terminator.desktop entry for Unity.

Go to your application folder, in my case it was /usr/share/applications. You need to have root permissions to edit with your text editor terminator.desktop.

In my case it was, sudo vim terminator.desktop.

Replace the Exec argument with your Command.

Now you can add the entry to your Unity Launcher, and it should always open your custom layout on the start.

Sharlike
  • 103
  • 4
Patrick
  • 301
  • 2
  • 3
  • 4
    not working in my 14.04 :( it just shows the same single terminal terminator window – tishma Jul 31 '14 at 12:01
  • You have to add `; bash` or `; zsh` (depending on your shell) after each command in your layout. Then it works fine and opens all windows. – luke Apr 09 '19 at 08:22
9

After setting up your layout, right-click on any terminal background and choose Preferences → Layouts tab and click on Add button. When prompted for the name type "default" and hit Enter.

Note: This may be a glitch but it's a useful glitch for me!

Aalex Gabi
  • 303
  • 3
  • 7
8

To open a previously saved layout, open the Terminator Layout Launcher by pressing ALT-L. There, click on the layout you need, and press launch.

Guus
  • 269
  • 3
  • 8
7

It's very simple. No need to edit the configuration file.

Just create your custom layout and Right Click->Preference->Layout->default and Press the save button. Now our configuration is saved as the default configuration. From next launch of the terminator, we will get the custom layout at the startup itself.

Lentin Joseph
  • 71
  • 1
  • 2
  • Found this to be the easiest solution of them all here. Firstly, positioning and creating set of windows and groups you want. Then saving custom layout and then re-opening the terminator did the trick! Thanks! – Shaze Feb 28 '19 at 10:24
5

Just as an anecdote, even after configuring custom layout 're-use profile for newer terminals' has to be checked otherwise the new terminal again opens in default profile. enter image description here

Sudip Bhandari
  • 271
  • 4
  • 9