A Perl script controls Tmux configuration
split-window statements in lines 47 and 48 with the
-h (horizontal) and
-v (vertical) options create additional panes in the window by dividing the window horizontally and vertically. Tmux numbers windows and panes from 0 up – but be careful, a frequently used Tmux configuration option changes the start point of the enumeration to 1!
In other words, to address the second pane of the first window in the
log4perl session of a newly installed Tmux, line 55 uses
log4perl:0.1; it then issues
send-keys to run the command for the test suite, followed by a closing
C-m (for Return). However, you could just as easily use
vagrant ssh to change to a Vagrant VM, as described in the previous issue of this Perl column , and ensure that the test suite is running in a virtual cleanroom. Line 51 finds the first two
.pm files in the hierarchy of the selected Perl project and passes in their names to the
vim editor with the
-p option, which displays them in tabs in the left-hand pane (Figure 2).
Tmux is included in many distributions' repositories; on Ubuntu, the command
sudo apt-get install tmux
will do the trick. Because the Tmux developers seem to have been very busy of late, users will want to go for version 1.7 at least – or even 1.8 – to take advantage of all the features introduced in this article. If you prefer a more DIY approach, you can pick up the source code  and build your own version. The only important dependencies are for libevent (at least 1.4.14 or 2.0) and ncurses. A Bash script available at GitHub  automates the build process.
Brian Hogan's book  provides useful tips for common tasks – from developer environments through pair programming, wherein two developers in two locations type in different panes in the same session. Even better: If you check the script into your source control system, the next engineer can simply fire up the development environment and start working productively right away.
- Listings for this article: http://www.linux-magazine.com/Resources/Article-Code
- Tmux: http://tmux.sourceforge.net
- Mike Schilli's Tmux configuration: https://github.com/mschilli/dotfiles/blob/master/.tmux.conf
- "Perl: Vagrant Vagabond" by Mike Schilli, Linux Magazine, June 2013, pg. 64-67, http://www.linuxpromagazine.com/Issues/2013/151/Perl-Vagrant-Package
- Script for a static Tmux build on difficult platforms: https://gist.github.com/ryin/3106801
- Hogan, Brian P. tmux: Productive Mouse-Free Development. Pragmatic Bookshelf, 2012
Buy this article as PDF
Four-inch-long computer on a stick lets you boot a full Linux system from any HDMI display device.
New statute would require companies to report break-ins to consumers.
Weird data transfer technique avoids all standard security measures.
FIDO alliance declares the beginning of the end for old-style login authentication.
The Linux New Media Awards have honored the most significant products, projects, people, and organizations for open source/Linux every year since 2000.
Legendary Uber-distro splits over the systemd controversy.
New LTS version offers many refinements for the Cinnamon and Mate desktops and significant improvement under the hood.
One of CeBIT’s most successful forums returns in 2015.
A new study says it is possible to unmask 81% of TOR users.
Redmond joins the revolution by turning the .NET Core Runtime into a GitHub project.