tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

learn more… | top users | synonyms

3
votes
1answer
17 views

Reorder tmux windows

How can I efficiently reorder windows in tmux? For example, having this set of windows: 0:zsh 1:elinks 2:mutt 3:irssi 4:emacs 5:rss 6:htop What would I have to do to move rss to between ...
4
votes
1answer
904 views

tmux and Powerline: working configuration

Background I found very interesting the Powerline project. After several attempts, I managed to get it to work correctly for Vim. Then I did proceed with enabling it for tmux, by pasting the ...
33
votes
3answers
7k views

How do I equally balance tmux(1) split panes?

I'm looking for a behavior that is similar to how vim(1) handles its split windows with ^w =. I know tmux(1) has predefined layouts with ^b Meta[1-5], but this likely does not have the layout that I ...
1
vote
2answers
34 views

How do I create a simple tmux conf that splits a window?

I'd like to create a simple tmux conf that does the follow. Splits the window/pane/whatever_stupid_terminology horizontally (hsplit) Opens in the top pane tail -f foo Opens in the bottom pane tail ...
23
votes
4answers
7k views

Is there an equivalent of GNU Screen's “log” command in tmux?

I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an ...
40
votes
11answers
23k views

Getting tmux to copy a buffer to the clipboard

I am trying to figure out a decent way to copy what I have in a tmux buffer into my clipboard. I have tried a couple of different things like bind-key p select-pane -t 2 \; split-window 'xsel -i ...
2
votes
0answers
26 views

Tmux log output [duplicate]

Im looking for a solution to an issue regarding tmux. One of my scripts ns2server stopped working recently when running start (using tmux) but not in debug mode (not using tmux). I found that using ...
6
votes
2answers
345 views

Execute a process in the current pane, redirecting stdio to/from the pane

GNU Screen has a command called exec that will launch a subprocess and optionally let you do things with its file descriptors, including tying them in your window. I frequently use :exec !! sx -b ...
12
votes
4answers
4k views

tmux status-bar corrupted after catting a binary file, how to reset?

I accidentally screw up my tmux terminal after cating a binary file. Now my tmux is messed up. Detaching and re-attaching doesn't help, nor does a redraw (C-b r). Running reset only redraws the active ...
1
vote
1answer
65 views

Show status lines of vim and tmux on the same line

I would like to figure out a way to get my vim statusline and tmux statusline on the same line if such a thing is possible and not immensely difficult (ideally, the vim prompt, or whatever it's called ...
0
votes
1answer
359 views

tmux with iterm2 attach a remote session

I'm using the Tmux integrating with ITerm2, which can create a tab in ITerm 2 for each window created by Tmux. But somehow this doesn't make much sense for the usual SSH scenario, where we first SSH ...
10
votes
2answers
1k views

protocol version mismatch (client 8, server 6) when trying to upgrade

I'm trying to upgrade to a newer version (that has a bug fix) than my current 1.6. I am on Ubuntu and recently upgraded to Ubuntu 13.04. Ideally I want to use tmux version 1.8 or even 1.9. I've ...
6
votes
1answer
521 views

Escape sequences in output of script called from ncurses application

I'm currently running mcabber as my Jabber client (which uses ncurses) in a tmux session on my homeserver. Locally i run iTerm2 as a terminal emulator, which supports the triggering of growl ...
2
votes
1answer
48 views

In tmux session, cannot connect to X server after ssh'ing

At work, I have a desktop with a monitor and a few running tmux sessions. At home, I frequently ssh into that desktop and enter my running tmux sessions. When I ssh from home, I do not want to use ...
6
votes
6answers
8k views

How can I page up or down in tmux with Terminal.app?

I have tmux installed. But I can not scroll up or down. I.e. as soon as I tmux I get only a portion of the screen and can not scroll up. crtl-b + Page Up does not work since I am in Mac and I can not ...
80
votes
5answers
22k views

Moving tmux window to pane

How do I move an existing window into a pane in another window in tmux when I have multiple windows, and vice versa? I'm coming from screen, where I can switch to the pane and then switch windows ...
18
votes
1answer
2k views

How do you make tmux count windows starting with 1 instead of 0?

I was able to make GNU Screen start counting windows with the number 1 instead of the default 0 with this code in my .screenrc: # Get rid of screen 0 bind c screen 1 bind ^c screen 1 bind 0 select 10 ...
3
votes
1answer
56 views

Is there a way to find out why tmux crashed

I am trying to shift from using VNC to tmux. My tmux keeps crashing at least once in a week and I am clueless why this happens. VNC rarely crashed and this weekly crash is a strong detrimental for me ...
1
vote
1answer
505 views

How to get byobu to start at startup with a command executed, as root?

I want when the computer start, a byobu session is started and a command executed in the first window (windows 0), without requiring any user intervention. It is very important that this doesn't ...
1
vote
1answer
27 views

tmux new pane has home directory as default instead of previous directory

When I press Ctrl+" (create a new pane) while in a pane, which has the PWD /tmp for example, the new pane starts as my home folder ~. I looked at http://unix.stackexchange.com/a/109255/72471 and it ...
7
votes
3answers
305 views

How can I have my .bashrc only invoke TMUX if it exists on my system?

I use tmux on most boxes, but not all. I have the following line in my .bashrc file: [ -z "$TMUX" ] && export TERM=xterm-256color && exec tmux which invoke tmux if it exists. I ...
7
votes
2answers
280 views

How do you hide a pane?

I have 3 panes in my tmux window: -------------------------- | | 2 | | | | | 1 |----------| | | 3 | | | | ...
9
votes
2answers
837 views

tmux, TERM and 256 colours support

Introduction My question arises from the necessity of understanding why I have now (after multiple trials) Terminal and tmux supporting 256 colours and tput colors telling me there are only 8 of ...
2
votes
2answers
72 views

Tmux Split Panes in the same window

I am new to using tmux in scripting and I am attempting to manipulate it so when I run a script I can have multiple screens attached and split in my Putty session, and also have it color coded and ...
12
votes
2answers
4k views

How can I move tmux's status bar to the top?

How can I move tmux's status bar to the top? Can't find it on the man page.
1
vote
0answers
100 views

Have tmux wait until I SSH in, to complete rest of Tmuxinator script

After recently discovering tmux and Tmuxinator, I've been trying to set up a development environment to use. Per protocol, we aren't allowed to store passwords/passphrases in scripts. So what I'm ...
13
votes
2answers
11k views

How do I get the solarized colour scheme working with gnome-terminal, tmux and vim?

There's a lot of questions around this, but it's because there are so many variables. I had to piece together instructions from many sites before I got this working. First, I could not easily set up ...
1
vote
1answer
61 views

tmux hightlight colour setting

In tmux, the default highlight setting is a yellow background -- at least on my version and machine. This is when using the mouse on X11 but is the same with the console selection. I cannot find the ...
13
votes
2answers
6k views

tmux bottom bar color change

I recently started to use tmux and like it much, but it's green bottom bar is a bit distracting, is there a way to change its color? or a way to hide it?
5
votes
1answer
58 views

How do I change the color of the pane dividing lines in tmux?

I've used the following command to change the color of the status bar at the bottom of the screen: set -g status-bg colour244 But I don't know how to change the color of the lines that divide ...
4
votes
1answer
20 views

How do I re-map the changing pane keys in tmux?

I want Prefix + Up,Down,Left,Right to be mapped to Prefix + Ctrlh, Ctrlj, Ctrlk,Ctrll. I tried: bind-key C-h Left bind-key C-j Down bind-key C-k Up bind-key C-l Right But it didn't really work: ...
4
votes
3answers
2k views

How do I run a shell command from .tmux.conf

How do I run a shell command from .tmux.conf, or otherwise automatically when tmux launches, without having to hit any other command? How can I create an alias, a function, or a script which boils ...
0
votes
0answers
20 views

tmux protocol mismatch with no upgrade [duplicate]

[This question should not be a duplicate of the one asked already. In this case, there has been no upgrades of any OS or tmux version anywhere. If this is going to be marked as duplicate still, please ...
2
votes
1answer
45 views

Why does tmux fail to “scroll” when entering a command that exceeds one line? (OSX Terminal.app)

When I use tmux and enter a command that exceeds the line, it fails to redraw the previous line. It simply clears the current line and I can't see what I just wrote. It does only redraw the first ...
3
votes
1answer
24 views

tmux session_name count

Let's say that I created four new tmux sessions (1, 2, 3, and 4). Now, I kill every window in session 2. tmux list-session only show that 1, 3, and 4 are active. If I create a new tmux session, it is ...
4
votes
1answer
146 views

What are valid keys for tmux?

I was trying to learn how to use the bind-key [-cnr] [-t key-table] key command [arguments] better, but was having some trouble figuring out what "valid keys" are for bind-key command. I tried doing ...
3
votes
1answer
242 views

zsh: set TERM=screen-256color in tmux, but xterm-256color without tmux

I need my $TERM to be xterm-256color outside of tmux (in "plain" terminal with zsh), but screen-256color inside tmux. First I tried: add export TERM='xterm-256color' to my ~/.zshrc. add set -g ...
0
votes
1answer
34 views

tmux: ncurses apps are displayed wrong (with garbage and so on) [duplicate]

I have ncurses apps (say, aptitude) working nice in plain xterm (or gnome-terminal, or any other terminal I've tried), but if I run it inside tmux session, screen isn't properly refreshed while I do ...
4
votes
2answers
182 views

Completion of words on the screen as in VIM (Bash or Tmux)

How can I configure Bash, Zsh or Tmux to complete the last matching identifier on the screen? Consider this common scenario: $ git fetch remote: Counting objects: 16, done. remote: Compressing ...
9
votes
2answers
3k views

Unlimited history in tmux

In your .tmux.conf file you can set the window history with something like: set -g history-limit 4096 Is there a way to set an unlimited history for each window?
3
votes
0answers
54 views

Is there a more elegant way to unlink two tmux clients sharing a session from inside tmux?

This is almost a code-review question, but very *nixy and more about configuration than code. For years since I switched to tmux from screen I've had a couple of nagging issues that I could not make ...
33
votes
3answers
9k views

Write all tmux scrollback to a file

How can I write all the scrollback in a tmux session to a file? (I know that, ex, capture-panel can grab the current screen… But I want the entire scrollback)
125
votes
10answers
25k views

tmux vs. GNU Screen

Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.
1
vote
2answers
123 views

Split tmux window with same command

I have a tmux window that I've open with a certain command. Is it possible to split that window with a new pane which also runs the same command, not the default command? The point is to avoid having ...
3
votes
1answer
30 views

Interrupting very long output in tmux

In a (gnome) terminal, if I cat a file which turns out to be much too long, I can always press Ctrl-c to interrupt. However, in tmux, when the same happens, it takes long for the signal produced by ...
9
votes
6answers
6k views

How can I set my default shell to start up tmux

I would like my default bash shell to go straight into tmux instead of my always having to type tmux every time.
1
vote
2answers
324 views

copy from tmux to any editor not working

I am trying to copy from tmux to my browser. I followed the post Copying between tmux buffers and the system clipboard which tells me to add setw -g mode-keys vi bind-key -t vi-copy 'v' ...
3
votes
1answer
64 views

Make tmux block until program completes

I am impressed by tmux's remote control features: tmux new-window -t p12346 'echo foo;sleep 10' This creates a new window in the session named p12346 and does not print anything on the screen. ...
1
vote
1answer
179 views

Remap select window 2 in tmux

In tmux you can switch to window 2 with prefix_key + 2. I'd like to press rather prefix_key + u. I tried in .tmux.conf this: bind-key u 2 and this: bind-key u select-window -t 2 Which doesn't ...
25
votes
3answers
5k views

Renumbering windows in tmux

I frequently end up with more than ten windows in tmux. Later on, I close some of my older ones. Is there a way to renumber, say window 15, to window 3 (which doesn't exist anymore)? Or to pack them ...