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

5
votes
2answers
2k 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
116 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 ...
0
votes
0answers
21 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 ...
3
votes
0answers
76 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 ...
3
votes
1answer
71 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 ...
3
votes
1answer
151 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
2answers
53 views

How to switch directly to a pane in Tmux?

I'd like to switch directly to a pane in Tmux, by pane #. How can I do this? I know how to cycle between panes, and move to panes that are beside the current pane. I'd like to be able to run the ...
3
votes
2answers
101 views

Finding out whether current alias/function/script is running inside Tmux - with a twist

NB: Yes, I've read How can I tell if I'm in a tmux session from a bash script? How can I find out whether I am running inside a Tmux session from my shell or shell script or shell function or ...
0
votes
0answers
67 views

Disable mouse scrolling in vim with tmux

I'm experiencing the same problem as in this Q&A titled: disabling mouse support in vim in a gnome-terminal environment, where it was found (in the comments for the top answer) the problem wasn't ...
3
votes
2answers
2k views

Use system clipboard in vi-copy mode in tmux

I'm running tmux 1.6 and I'm trying to configure it to use vi-style keybindings as well as use the system clipboard when copying in interactive mode: set-window-option -g mode-keys vi bind-key -t ...
4
votes
1answer
1k views

How to quickly send commands to nested tmux sessions?

I have the following in my .tmux.conf set -g prefix M-j bind-key j send-prefix I need to press (Atl+J) + (J) + bound-key to send something to the nested tmux session. I feel it is rather slow. Is ...
4
votes
0answers
494 views

tmux exits immediately after starting

I'm trying to start with Tmux but failing to even run it. Immediately after starting it exits. looked like It's the same as this question It happens both without a .tmux.conf and (following some ...
0
votes
1answer
66 views

How can I get a tmux session menu from outside a tmux session?

I'm trying to build a wrapper for tmux that presents me with a menu of all available sessions instead of creating a new one. However the man page explicitly says that this is not possible (excerpt ...
2
votes
2answers
329 views

Tmux config not retaining PWD on new-window or window split

So I'm trying to update my .tmux.conf file to reflect the change for -c in new-window. I've added this to my conf and it's not working unfortunately. My new windows and panes always start in ~/: # ...
1
vote
2answers
240 views

How to colorize last window in status line?

I'd like to make the last selected window (the one to which :last-window takes you) to stand out visually. By default it's just marked with an inconspicuous - after the name. Is there a way to set ...
2
votes
2answers
378 views

Getting 256 colors to work in terminal multiplexer

tmux I followed Getting 256 colors to work in tmux: I have alias tmux='TERM=xterm-256color tmux' in ~/.bashrc and also set-option -g default-terminal "screen-256color" in ~/.tmux.conf In konsole: ...
1
vote
0answers
27 views

How to stop tmux capturing key sequences?

My xterm is configured to produce this sequence: Ctrl ~Shift <Key>Tab: string(0x1b) string("[27;5;9~") \n\ Under tmux it almost always does not work (sometimes it passes through). What could ...
1
vote
1answer
126 views

Get TMux scroll buffer contents

With TMux, is there any way to programmatically retrieve scroll buffer content from above the current command line? I'm basically looking to write a bash script to iterate upwards until I find a ...
2
votes
1answer
30 views

Does TMUX have unit tests or a test suite?

I am going through my configuration shell scripts and I have found the make commands to run test suites for pretty much every "big" open source project that I use (vim, zsh...) except for tmux. I ...
2
votes
2answers
101 views

How can I change the terminal tmux info (lower right) called status-right to username or host?

I have 7 dashes (-------) on the lower right. Can I replace them with something like my name or my host name? This is not about the PS1 prompt. I already have time name host dir there. I use tmux. I ...
1
vote
0answers
75 views

tmux color theme in emacs gtk

When I use emacs -nw I always use it in tmux 256-color mode. tmux applies its default color theme to emacs so it looks like this: For some reason I like that color theme far better than any other ...
0
votes
1answer
230 views

RVM + TMUX—Duplicate entries in $PATH

My Linux terminal config files (.bash_profile, .profile, .bashrc) expand $PATH by prepending some custom directories. This only happens once (and I've also included some ENV vairiable based guards to ...
3
votes
2answers
108 views

tmux client/server version mismatch during distribution upgrade

It has become fashionable to run distribution upgrade in a tmux terminal to avoid remote connection issues or issues with the X server (e.g. opensuse documentation). Yet this does not take into ...
1
vote
2answers
342 views

How to add a horizontal split to tmux window that spans the whole width of the parent window?

When I have a tmux window vertically split into two panes, how can i spawn a new third horizontal pane that stretches over the full width? e.g. How do I get from this: Ctr-b % +–––––––––+–––––––––+ ...
2
votes
1answer
127 views

Can I change tmux status bar color when I hit C-b

I use tmux on the local computer then ssh and use tmux too. I can easily use them both (C-b twice for modifying the second tmux) but for more readability I'd like to highlight the status bar of the ...
1
vote
1answer
92 views

Combining local and remote terminal multiplexing

I use tmux regularly to easily handle multiple terminals on my local machine. Sometimes, I need to connect to a remote machine and start a script in one the terminals (i.e. a pane or window in tmux). ...
1
vote
0answers
69 views

Execute commands on TMUX Detach

Is it possible to execute commands on tmux detach? I usually have a rails console and server running in the tmux session, on detach is it possible to automatically end those? Thanks.
2
votes
2answers
1k views

How do I increase my iterm (tmux) window scrollback (not the line scrollback)

When I want to scroll back, i.e. with my mouse (or with PageUp) I can only go up about 43 pages (about 2000 lines). Can I increase that? I have my terminal preference -> "Scrollback Lines" set to ...
6
votes
1answer
53 views

Why does Tmux Space leader also make 2 a leader?

I have a very simple tmux config file that contains the following: set -g prefix C-Space This works great for using my spacebar as a leader, however it also makes C-2 and C-@ leaders. This is ...
0
votes
1answer
65 views

What speed should zsh connect to tmux at?

I think this is a tmux question, though it may be a zsh question, or a question relating to both. I SSH to a server from a Windows box using PuTTY. In the PuTTY configuration window, in the Data ...
2
votes
1answer
153 views

tmux: shared session, one user in a pane, another in another pane, two different cursors

I've decided to try tmux: have been reading the docs and googling around, trying to find a way to have two users sharing a session, each with a different cursor. However, giving 777 permissions to ...
3
votes
1answer
79 views

Why does `tmux` copy operation always output temporary gibberish to the terminal?

If I complete a copy operation using tmux, I always get one or more lines of gibberish written to my screen, which goes away when I change windows or do a paste. Why does this happen, and can it be ...
4
votes
1answer
386 views

Set tmux status line color based on hostname

I'd like tmux to pick a color dynamically based on the hostname of the machine. Since I share my tmux.conf across several machines, assigning an unique color for each of those hosts would be handy ...
18
votes
2answers
3k 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 ...
3
votes
2answers
230 views

When exiting the last terminal in a tmux session can it switch to another?

When I exit the last terminal in a tmux session it will automatically close tmux and return me to the parent terminal. Is it possible to instead have tmux switch to another, already running, session ...
1
vote
1answer
590 views

How can I start tmux automatically in fish shell while connecting to remote server via ssh

I switched from bash to fish shell. I liked it and decided to use it on my servers also. How can I start tmux automatically on ssh connection? I followed this instruction for bash but fish shell is ...
0
votes
1answer
436 views

Tmux monitor activity change highlight color

I'm setting up my tmux.conf and I want to have the activity monitor with different colors. I would like to change the color of the highlight of the alerted window in the status bar. The problem ...
4
votes
2answers
308 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 ...
4
votes
1answer
3k 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 ...
1
vote
1answer
109 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 ...
6
votes
1answer
1k views

tmux, Vim and Solarized

Premises Browsing around tmux, Vim and Solarized I can find lots of complains about 256 colours and "user experience". Well, I'm having the opposite "problem", i.e. Vim works well with a full ...
13
votes
2answers
4k 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
0answers
112 views

xinitrc: starting xterm with tmux causes all windows to share same geometry

I have xterm with tmux open upon startup of X11 with the following line in my xinitrc file: xterm -e tmux & However the -e tmux causes all windows to assume the geometry of the first -geometry ...
3
votes
0answers
67 views

How to detect TMux level

Is there any way to detect how many levels of tmux I'm currently in? I've been able to hack it with 2 levels by simply checking [[ -n "$SSH_CLIENT" && -n "$TMUX" ]], so I can have one level on ...
1
vote
1answer
29 views

Split parent pane instead of the active one

Let's say I've obtained this configuration by using splitw -h once, with A currently active: +---+---+ | A | B | | | | | | | +---+---+ How can I add a new split below those 2 splits? ...
4
votes
2answers
706 views

Using environment variabless in Tmux status bar shell commands

I am attempting to create a tmux status bar which shows three timezones: US Eastern Time :: UTC :: Central European Time. Using the TZ environment variable makes the date command show the time in a ...
6
votes
2answers
933 views

How can I forward a already forwarded ssh key into tmux?

I'm connecting through SSH from a machine where my keys are stored, forwarding to a second machine, and then try to use the keys from within tmux. I appear to "loose" the forwarding when entering ...
1
vote
0answers
66 views

tmux disable automatic-rename on break pane

If I setw automatic-rename off on two windows, then join them, when I detach either one tmux automatically renames it! And "show-window-options" now has no record of the "automatic-rename off". How ...
1
vote
1answer
116 views

How to see the amount of pending data on a unix domain socket?

When I'm logged to a tmux session from two different computers, I'd like to be able to trace the amount of pending data on the sockets of both tmux session. To test this I logged to computer A and to ...
0
votes
1answer
512 views

Tmux key-bind like to use the windows/super for my meta key in Tmux Without X [duplicate]

I have RaspberryPI with no GUI==(no x.org) I like to bind the useless window/super key to be my prefix. Using Arch for ARM runs great. If think this is going to take more then simple mod in the ...