1

I am using a terminator layout to start multiple terminals, and would like to call an alias at each terminal start which is defined in my .bash_aliases (called by both .bashrc and .profile). Terminator unfortunately doesn't know about those aliases when starting the terminals. How can I fix that?

I start terminator with this command:

terminator -l my_layout -f

EDIT:

As a temporary solution, I ssh -A -YC into myself and then run the alias. All this as a custom command.

0

Set an environment variable for your Terminator windows, and call the aliases from your .bashrc. In terminator's config:

[layouts]
  [[default]]
    [[[child0]]]
      order = 0
      parent = ""
      type = Window
    [[[child1]]]
      labels = Alias0, Alias1, None
      order = 0
      parent = child0
      type = Notebook
    [[[terminal1]]]
      order = 0
      parent = alias0
      profile = root
      type = Terminal
    [[[terminal2]]]
      order = 1
      parent = child1
      profile = alias1
      type = Terminal
    [[[terminal3]]]
      order = 2
      parent = child1
      profile = default
      type = Terminal


[profiles]
  [[alias0]]
    custom_command = MY_ALIAS=0 bash
    use_custom_command = True
  [[alias1]]
    custom_command = MY_ALIAS=1 bash
    use_custom_command = True

And in .bashrc:

case $MYALIAS in
    0) alias0
        ;;
    1) alias1
        ;;
    *)
        ;;
esac

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.