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
0answers
137 views

What do you use to manage your shell history? [duplicate]

Possible Duplicate: Preserve bash history in multiple terminal windows Can I easily search my history across many screen windows? I rely on my shell history a lot, I use Ctrlr and arrow ...
15
votes
4answers
5k views

How to get vim to work with tmux properly?

I'm trying to figure out how to get vim and tmux play together. My problem is: When I use xterm-256color I get vim to work nicely, but the background doesn't render properly. I fixed this by using ...
9
votes
2answers
671 views

Two prefix commands for tmux?

We have a tmux session that several people need to connect to. Some people like the Ctrl+a prefix shortcut and some people prefer the default Ctrl+b shortcut. Is there anything I can put in the ...
2
votes
1answer
2k views

How to verify if tmux is properly installed on Mac OSX

I've just tried installing tmux from source (via installing libevent first). The installation seemed fine, without throwing any obvious error. But when I typed tmux in iTerm2, it returned "command not ...
5
votes
2answers
2k views

Send a command to a running tmux session (like screen -X)

I'm looking to switch from screen to tmux for my terminal multiplexing needs, but there's a feature of screen that I need to replicate in tmux: the -X option, which allows one to run arbitrary screen ...
35
votes
4answers
10k views

Write all tmux scrollback to a file

How can I write all the scrollback in a tmux session to a file? capture-panel can grab the current screen, but not the entire scrollback.
14
votes
3answers
3k views

Shift-arrow not working in emacs within tmux

I recently started using tmux (was a screen user before) and I'm loving it, except for one small problem. I use emacs within my tmux session and I am used to using Shift-arrow keys to move between ...
24
votes
1answer
5k views

Attach to different windows in session

I have a pretty simple tmux session running with two open windows; one of them for local hacking and one of them for work. What I'd like to do is to simply connect to the hacking window while ...
12
votes
3answers
3k views

ESC key causes a small delay in terminal due to its Alt+ behavior

My terminal setup is gnome-terminal + tmux + zsh with vi bindings. In applications like vim or even in the zsh's command line vi editing mode, I need to frequently hit the ESC key but there is a ...
29
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 ...
7
votes
1answer
1k views

How do I highlight a search result in tmux?

When I search a terminal window in tmux, it sets the cursor the keyword search, but doesn't highlight the matching word. Screen used to do this, and it was much easier to visually find a match. ...
0
votes
1answer
481 views

Tmux not scaling to fill the window [duplicate]

Possible Duplicate: Tmux viewport caused by multiple concurrent sessions I have a weird issue where tmux isn't scaling to fill the window it's in: I haven't had this issue before, is ...
4
votes
2answers
2k views

Convert gnu screen status line to tmux status line

I am using the following screen status line, configured in my screenrc: I configured it using the following line: hardstatus alwayslastline hardstatus string '%{= kG}[ %{G}%H %{g}][%= ...
1
vote
1answer
946 views

In Openbox, is it possible to execute a command in a matching window, or open a new one if no match exists?

Essentially, I'm looking for a way to keep one terminal open running tmux, and open new windows inside of the session rather than spawning new terminals. On pushing a key sequence, I'd like to open a ...
9
votes
3answers
4k views

Using Ctrl+B in less within tmux

I use the Ctrl+B command prefix in tmux, however this clashes with Ctrl+B in less, which is used for scrolling up a file. How can I get this to work? Do I have to set a different command prefix in ...
4
votes
2answers
689 views

Prevent tmux from starting up on SSH

I would like tmux to create a new-window when I ssh onto a machine from an existing tmux session. However, I do not want a tmux session started on the new machine! I have the following in my .bashrc, ...
11
votes
2answers
3k views

Prevent pane/window from closing when command completes - tmux

In my tmux.conf file I have it configured to open windows, name them, setup panes etc.. etc.. However one issue I have is that if one of the panes launches a command, let's say ls, then the pane ...
6
votes
3answers
377 views

Why might tmux only be capable of attaching once per shell session?

I'm using tmux on a Fedora 8 server (workplace restriction) to monitor several boxes on a stress rack. I noticed that I can only attach to my detached tmux session once per shell session. In order ...
4
votes
1answer
909 views

How to run streamripper and mplayer in a split-screen X terminal, via a single script

I want to run streamripper in its own X Terminal (window), then split the terminal horizontally, and then run mplayer in the lower half. This is simple enough to do manually, but getting a script to ...
42
votes
12answers
26k 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 ...
7
votes
1answer
2k views

using environment variables in tmux.conf files

Is it possible to use an environment variable in a tmux.conf file? I am trying to set a default-path to an environment variable. Currently what I am trying is: set -g default-path $MYVAR further I ...
7
votes
2answers
2k views

how to close all panes but the current pane in tmux

I have a key bound to setup panes to my liking, but sometimes things get messed up or out of hand and I want to close all the panes and rerun the script. Is there a simple tmux command to close all ...
14
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.
9
votes
3answers
2k views

How can I bind multiple tmux commands to one keystroke?

Specifically I'm trying to give a notification after some command was completed. So, for example, if I reload my configuration file, I'd like to have some confirmation that it worked, which might be ...
85
votes
5answers
24k 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 ...
4
votes
2answers
412 views

What are the virtues of multitasking with traditional job control vs Tmux/Screen?

tmux and screen let you run different processes (e.g. vim, a bash script, mysql, psql, etc) in different virtual windows. But traditional Unix job control (using CTRL-z, fg, bg, and jobs) seem to give ...
2
votes
1answer
443 views

When you type a search term in copy mode, is there a way to erase the search term with something like CTRL-U?

I enter into copy mode and do a search of the tmux window buffer with /. This works great, except when I want to do a second search, the original search term appears at the search prompt and I have to ...
41
votes
5answers
11k views

Create new-window with current directory in tmux

Is is possible to open a new-window with its working directory set to the one I am currently in. I am using zsh, if it matters.
6
votes
1answer
1k views

Automatically adjust window width in tmux

Is there a way to set tmux so that it automatically adjusts window width when I switch to the pane so that it will be wide axactly as the longest (visible on screen) line in the file I have open? I'm ...
4
votes
2answers
1k views

Terminal and web browser combination

I often use only two applications, terminal and web browser. I like the tmux application which enables to split a terminal window into more regions. I noticed that I can open lynx in another region ...
19
votes
1answer
4k views

How can I tell if I'm in a tmux session from a bash script?

I like to keep my bash_profile in a git repository and clone it to whatever machines I have shell access to. Since I'm in tmux most of the time I have a user@host string in the status line, rather ...
17
votes
6answers
18k views

How can I run a script immediately after connecting via SSH?

I started to ask this question but answered it while I had it open. I'm going to post this question, follow it up with my solution and leave it open to other potential solutions. <backstory> ...
1
vote
1answer
369 views

Tmux viewport caused by multiple concurrent sessions

When attaching to the same tmux sessions from multiple computers using ssh and tmux attach, my screen looks like: ------------------------- $> |........ |........ ...
5
votes
2answers
1k views

Is it possible to run a Vim clientserver instance over SSH+tmux

I've been a vim junkie for a year or so now and I've got some great little tricks burnt in to my memory. I do a lot of development (at the office) in a terminal on Ubuntu. One of the things I value ...
7
votes
2answers
1k views

Is there a tmux shortcut to go read only?

I've been using screen for years now as a way of ensuring that any remote work is safely kept open in after disconnects/crashes. In fact, as a matter of course, I use screens even when working ...
5
votes
3answers
1k views

Scrollability of text when using tmux?

Scrollability of text in some terminals: | tty | xterm | urxvt | guake | terminator screen | Y | Y | Y | Y | Y tmux | N | N | Y | N | N I notice in this ...
4
votes
1answer
1k views

Running several commands in a screen-split

I have a few long running commands that I would like to run together in the same screen (same tab in the terminal app). My current setup is like this: tmux new-session -d 'cmd1' tmux split-window ...
8
votes
2answers
5k views

How do I bind to Shift+{Left,Right} in tmux?

I'm looking at tmux from screen, and have hit a bump while configuring the (highly configurable!) tmux key bindings. Problem is, in my .screenrc I have bindkey ^[[d prev bindkey ^[[c next bindkey ...
23
votes
4answers
8k 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 ...
53
votes
4answers
12k views

What are other ways to share a tmux session between two users?

I'm looking for a clean and easy way to share a tmux session with another user on the same machine. I've tried the -S socket-path option, but it requires opening up all permissions of the socket-path ...
4
votes
3answers
959 views

`$XAUTHORITY` appears from 'nowhere' on su+tmux

When I switched from su+bash to su+tmux+zsh I noticed that I get $XAUTHORITY variable defined as /root/.xauthXXXXXX where XXXXXX are 6 random alphanumeric characters. With previous configuration X ...
11
votes
4answers
5k views

How do I bind the tmux prefix to a Super?

I find even Ctrl+b to be very emacs like but I understand the point. I'm wondering if I could bind it to a single keypress of a key I don't other wise use? namely Super_L (also known as the left ...
62
votes
2answers
35k views

Getting 256 colors to work in tmux

I have 256 colors working just fine in konsole,. I thought I'd give tmux a try because, unlike screen, it seems to support vi mode. However I find that the colors of my prompt show up and this is ...
127
votes
10answers
26k 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.