2

I figured out few weeks ago how to start terminator with a custom layout instead of creating it manually (by using terminator -l). Now I would like to start terminator and have every single pane of my custom layout automatically connect to a remote server (unfortunately I have to manage multiple servers). Is there any way or any scripting support/language to do that?

  • Do you need scripting support for that? You could use multiple profiles with custom commands, and then assign each pane a profile. – muru Dec 9 '14 at 11:33
  • I am not aware about 'terminator profile'. I read few posts mentioning option -p, but I haven't seen this option listed in the terminator man page I have. I am using version 0.95 – Abruzzo Forte e Gentile Dec 9 '14 at 11:36
2

My terminator configuration looks like this:

[profiles]
  [[default]]
    # some settings
  [[root]]
    # some colour settings
    use_custom_command = True
    custom_command = sudo -i
    exit_action = restart
  [[lab]]
    # some more colour settings
    use_custom_command = True
    custom_command = ssh -R 2022:localhost:22 lab
    exit_action = restart
  [[server]]
    # some more colour settings
    use_custom_command = True
    custom_command = ssh server
    exit_action = restart
[layouts]
  [[default]]
    [[[child0]]]
      type = Window
      order = 0
      parent = ""
    [[[child1]]]
      labels = None, None, None, None
      type = Notebook
      order = 0
      parent = child0
    [[[terminal1]]]
      profile = root
      type = Terminal
      order = 0
      parent = child1
    [[[terminal2]]]
      profile = lab
      type = Terminal
      order = 1
      parent = child1
    [[[terminal3]]]
      profile = server
      type = Terminal
      order = 2
      parent = child1
    [[[terminal4]]]
      profile = default
      type = Terminal
      order = 3
      parent = child1

By combining profiles with custom_command, I get four tabs on startup, one with a root shell, two opening ssh connections and a fourth running normal shell.

These options are documented in the terminator_config(5) manpage

  • It works!What do you use to avoid inserting the passwords every time? SSH Key file or any other tool/command? – Abruzzo Forte e Gentile Dec 9 '14 at 11:54
  • @AbruzzoForteeGentile ssh keys. – muru Dec 9 '14 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.