OpenBSD Journal

Interview with Nicholas Marriott on tmux

Contributed by weerd on from the screening dept.

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.

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.

(Comments are closed)


Comments
  1. By Simon (Simon_) on

    Nice interview and tmux just rocks!

    Is there a way to attach a session twice, but without one "attachment" changing the window affecting the other "attachment"? Like 'screen -x'?

    Comments
    1. By Nicholas Marriott (nicm2) on

      > Nice interview and tmux just rocks!
      >
      > Is there a way to attach a session twice, but without one "attachment" changing the window affecting the other "attachment"? Like 'screen -x'?

      Not at the moment. I'd like to do it but I don't really want to break the current behaviour - and it is a bit nontrivial anyway.

      Note you can simulate this by just linking all the windows from one session into another.

  2. By jirib (jirib) jirib@mailinator.com on

    nice... i did a test of tmux only on Linux, easy a quick, but midnight commander looked really terrible :(

    maybe something from this project can be taken as idea:
    http://www.brain-dump.org/projects/dvtm/#screenshots

    Comments
    1. By Nicholas Marriott (nicm2) on

      > nice... i did a test of tmux only on Linux, easy a quick, but midnight commander looked really terrible :(

      It is absolutely impossible to even try and fix this with such a lack of information.

      > maybe something from this project can be taken as idea:
      > http://www.brain-dump.org/projects/dvtm/#screenshots

      Did you have anything specific in mind?

    2. By Matthew P. Cashdollar (rootbeer) on

      > nice... i did a test of tmux only on Linux, easy a quick, but midnight commander looked really terrible :(

      Was it due to the high ascii characters used? Try mc -a to use pipe symbols instead of line characters

  3. By foldingstock (foldingstock) foldingstock@gmail.com on http://www.theowned.org

    I just wanted to say I have been using tmux on various linux/bsd installations for the past couple of months and I am very pleased to see it being included in OpenBSD's base.

    Excellent work Nicholas.

  4. By Paul Irofti (bulibuta) bulibuta@sdf.lonestar.org on

    Thank you so much for tmux!

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]