|Contents||Bulletin||Scripting in shell and Perl||Network troubleshooting||History||Humor|
tmux uses a client-server model. The server holds multiple sessions and each window is a independent entity which may be freely linked to multiple sessions, moved between sessions and otherwise manipulated. Each session may be attached to (display and accept keyboard input from) multiple clients.
tmux is intended to be a modern, BSD-licensed alternative to programs such as GNU screen. Major features include:
tmux is part of the OpenBSD base system. The portable version is hosted on SourceForge and runs on Linux, FreeBSD, NetBSD, Solaris and AIX.
tmux depends on libevent 1.4 and a terminfo implementation (normally ncurses).
Interview with Nicholas Marriott on tmux
All in all, tmux is a very nice alternative to screen and it has the great benefit of being in base as of OpenBSD 4.6. If you're still on an older version and want to try out tmux, you can install the package or install a recent snapshot.
We recently reported on the fact that tmux was imported into OpenBSD. By now, several changes have gone into the tree, including new features and some fixes from other developers. We spoke with Nicholas Marriott about tmux and his ideas for the future.
OpenBSD Journal: Why did you write tmux when there is well known screen ? Were you a heavy screen user before tmux ? Did it frustrate you into writing tmux ?
nicm@: I was a heavy screen user and I was vaguely unhappy with it. It was another of those programs with a lot of baggage - poor documentation, a strange configuration file and an unintuitive command-line interface. And that isn't mentioning the code.
There were a few things I wanted. In particular, being able to share a single window between multiple terminals, with other windows in the same session but entirely separate. Adding this to screen was implausible; it became one of my goals to have a codebase that was readable and could be extended.
OJ: How long have you worked on it so far ?
nicm@: tmux began with a quick prototype (called "nscr") and a few basic functions. A few months later I started fleshing out the prototype out and published the first version online in late 2007.
Currently, tmux is pretty usable and stable; I think most users could switch from tmux to screen or vice versa without missing too many features from either. There are still many feature requests and a lot of work to be done so I encourage everyone to read the code and send me their patches!
OJ: Can you tell us about how/when tmux got into base and you got your account ?
nicm@: It wasn't something I had expected. Paul Irofti [pirofti@] brought tmux up at the last hackathon and they decided to import it. Theo asked me for my opinion and I preferred to work on it in base: I felt tmux would be improved by being part of OpenBSD, it would add many more expert users and developers, a larger userbase, and a more rigorous development schedule - not to mention being more useful and easier to use than window(1).
OJ: Are you striving for full feature completeness compared to screen ? What screen features are you missing that you still want to add, which will you never add and what does tmux do that screen doesn't ?
nicm@: I don't like to sound like a politician, but that is a difficult question and the answer is "yes and no". I'd like for most people to be able to achieve the same things they can in screen in tmux. But tmux is not intended to be a copy of screen, and it should not behave as screen or have screen features just because screen has them.
At the moment, tmux has most of the major features of screen, but some things are missing - mostly things I didn't use. ;-)
If anyone is feeling itchy, here are a few items from my todo list:
- the ability to bind arbitrary strings to tmux key bindings instead of just keys from terminfo(5);
- make mode key sequences (eg in copy mode) customisable;
- better editing at the command prompt (clear, delete word, etc) and improvements to scroll mode, such as search and better vi keys;
- convert some outside-only commands to work inside tmux (attach, new);
- add many more info() displays;
- commands which expect filenames should expand ~ at the start;
- man page improvements: make sure every command matches the code and vice versa, and split the command list up by use rather than alphabetical order;
- improve terminal support, and find the copy/paste line wrapping problem;
If anyone has more, or has questions, let me know. :-)
OJ: Did the integration into OpenBSD base change anything for you and / or your development process ?
nicm@: Import into OpenBSD has been a good thing: I have received many feature requests, bug reports and code changes. I have to do a bit of work to sync up to make portable releases but tmux was already very portable and cvsps makes the job pretty easy so far.
OJ: What are your future plans for tmux ? What's next on your todo list ?
nicm@: There is a lot of work to be done in many areas, just look at the todo list.
At the moment I'm working on improving the layout code so that it is possible to split both vertically and horizontally. This will make layouts become "layout sets" which you can apply and then adjust.
I think it is pretty awesome and I have about 90% of it complete. Some of it is being tested now, and I hope to finish the whole thing within the next week or so.
Once that is done I'm not sure what I'll look at next. I have some ideas about adding hooks so you can execute commands on certain events (new window created, terminal resized, etc) but I haven't really thought that through too much. I might just spend some time trying to blitz the todo list and my inbox into manageable state. ;-)
Plus at the moment I spend time implementing smaller feature requests and fixing the odd bug.
OJ: Will you be working on other stuff in OpenBSD ? If so, what ?
nicm@: I don't know; I'd like to. At the moment tmux takes most of my time, but it has interested me in related areas such as terminal emulation and ncurses, so I might take a look at what I can do there.
OJ: Thank you, Nicholas, for your time in answering these questions and thanks for a very useful tool.
I started using tmux today. Its a terminal multiplexer / task switcher for UNIX-likes, very much in the same vein as GNU Screen. However, its a from-scratch implementation, designed to be clean, sane and easy to configure. The more liberal 3-clause BSD license is a plus also, since it means that OpenBSD has been able to integrate it into the source tree, so that its available out of the box.
Comparison with GNU Screen
I’ve been a heavy screen user for many years – almost all my work is done on remote screen sessions. However, screen configuration has always been essentially black magic to me. For this reason, tmux and its nice manual page is a breath of fresh air. `tmux list-commands’ is very straight forward and easy to grok. Furthermore, I like that everything in tmux is scriptable from the command line – you can run commands like `tmux resize-pane-up -t comms’ to resize the pane on a session called ‘comms’.
The other thing I really like about tmux is its default status bar. Some people might hate this, but I find it very useful to have a clock and a list of windows along with the process executing in them. This took quite some work to set up to my liking in GNU screen, but the default in tmux is great.
switching from gnu screen to tmux (updated) Linux~ized
# ` is an interesting key for a prefix
set-option -g prefix `
# set-option -g prefix C-a
bind-key C-a last-window
bind-key ` last-window
bind-key a send-prefix
# we might need ` at some point, allow switching
# we can also send the prefix char with `-a
bind-key F11 set-option -g prefix C-a
bind-key F12 set-option -g prefix `
# 0 is too far from `
set -g base-index 1
# set-option -g default-terminal "screen-256color"
set-option -g mouse-select-pane on
set-option -g status-keys vi
set-option -g bell-action any
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
set-option -g visual-bell on
setw -g mode-keys vi
setw -g mode-mouse on
setw -g monitor-activity on
bind e previous-window
bind f next-window
bind j up-pane
bind k down-pane
set-option -g status-utf8 on
# set-option -g status-justify centre
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 40
set-option -g pane-active-border-fg green
set-option -g pane-active-border-bg black
set-option -g pane-border-fg white
set-option -g pane-border-bg black
set-option -g message-fg black
set-option -g message-bg green
#setw -g mode-bg black
setw -g window-status-bg black
setw -g window-status-current-fg green
setw -g window-status-alert-attr default
setw -g window-status-alert-fg yellow
set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
# set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g history-limit 4096
# `+r reloads the configuration, handy
bind r source-file ~/.tmux.conf
I have recently discovered tmux, a replacement for the slightly aging gnu screen. The so called “terminal multiplexer” allows to open several terminals inside the same terminal window. Much like gnu screen, you can split the screen, resize the different parts etc. However, tmux allow the usage of 256 color terminals and is based upon a client server infrastructure. And before you ask, like screen, it will stay alive and run your favorite app until you reconnect to the session.
It is part of the OpenBSD base distribution but will compile and run on a number of OS including Linux. Solaris, AIX, etc.
Update: for Mac OS users, it is available from macports.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.
ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least
Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.
Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info|
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: February, 19, 2014