Read more

How to start Terminator with split screens and custom commands running

Dominik Schöler
November 28, 2014Software engineer at makandra GmbH

Starting Terminator with split screens is quite simple: Just store a layout and start Terminator with the --layout <your layout> option.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

However, if you want to run custom commands in your terminals, you need to do some work to keep these terminals from closing after a command exits. You accomplish this by tweaking bash to run a command before actually starting.

Pimp your .bashrc

Add this to the end of .bashrc:

# hack to keep a bash open when starting it with a command
[[ $startup_cmd ]] && { declare +x $startup_cmd; history -s "$startup_cmd $startup_args"; eval "$startup_cmd $startup_args"; }

Store a Terminator layout

  1. Open Terminator preferences
  2. Go to the Layouts tab
  3. Press "Add"
  4. Add a custom command to each split terminal. Format:
command = 'env startup_cmd="<your_command>" startup_args="<your_arguments>" bash'

Edit Terminator boot command

In case you ALWAYS want to run Terminator with certain options, run sudo vim /usr/share/applications/terminator.desktop and change the Exec line to this:

Exec=terminator --layout <your_layout> --maximise --working-directory=<working_directory>
Posted by Dominik Schöler to makandra dev (2014-11-28 10:24)