Using Tmuxinator and Tmux

I have been using tmux since my summer’15 and it has actually become very essential for running various scripts and commands which I often forget, within same window with only one command for its initiation. Tmux is referred to as a terminal multiplexer and is similar to GNU Screen. Basically, a terminal multiplexer enables you to run multiple terminal sessions within one window.

Why Tmuxinator?

One reason that a organisation who has lots of packages in ROS ( Robotic operating system) is that it lets you keep all your ros commands and scripts well organised within different panes of same window. It doesn’t let all the ROS_INFO and printf’s to print the statements simultaneously within same tab, but gives a very neat output. Have a look over this example I have run recently:

Without tmux, print statements from different codes summing up

Without tmux, print statements from different codes summing up

Using Tmux for 6 different commands

Using Tmux for 6 different commands







As I am working for AGV organisation ( Autonomous Ground Vehicle), I do come across running many ROS launch files, infos, rostopic echo, and every package being equally important for launching has to be dealt carefully while running most of them in certain sequence. This lead me to search google and I ended up searching solution to become free from this problem with tmux. This would allow you to automatically set up commands in respective panes, which can also be organised in different windows depending on their module. Like for my organisation, scripts were distributed as Controls, Sensors, Planner as seen in above screenshots.

Guide to set tmux yourself:

Its better you are updated with original repository from here.

Open terminal

Always remember to set you default text editor. In case you haven’t done so,

To start new session

With this a green strip must appear below terminal
To create a new project:

This must pop up a config file with extension .yaml
Edit this file as according to your requirements for scripts and commands

A default config file would look like


I changed this to,

Here,Controls,planner,sensors are the name of the windows under which sub-windows termed as panes open up.
Each window can be designated for carrying out a particular process and each pane to carry out a particular command.
Layout decides the splitting size and shape of the panes opening up.Generally,tiled will be preferd.
Below the text panes: ,you can add as many commands in format shown above.And each command will be executed in a new pane only
A #empty command specifies opening a new pane without any initial command executed.
Similarly, a new window can also be constructed by editing the above config file in controls,planner,sensors format.


The config file is space sensitive.Use of TAB is not recommended. If any command is initilaized with sudo ,and proper changes haven’t been made to sudoers file,then that particular command will not executed simultaneosly as others (It will prompt for password).
Its better to make the following changes to sudoers file so as to increase the time limit and password versatility in any other terminal.
To open sudoers file: Type $ visudo in a new terminal.

Since,tmux executes all the commands in the panes simultaneously,it can give errors for the processes that must be executed sequentially.Under such case, use of command sleep [time in seconds] will be preferable as shown in controls window of the above config file.
Moreover,a new session can also be executed separately for planner and sensors modules of the above config file incase they have prerequisite commands like mentioned in controls module.

For ease in navigation through different panes within tmux

Open terminal

$ gedit .tmux.conf

and write the following piece of code:

Leave a Reply, I generally respond quickly

%d bloggers like this: