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

7
votes
1answer
2k views

Vim not running inside tmux

When I try to open a file using vim inside tmux the whole window freezes. I have to kill the window with C-a &. Here are my ~/.vimrc settings: :set autoindent :set ts=4 :set number :set ...
7
votes
3answers
1k views

Does a terminal multiplexer have any benefit when used with a tiling window manager?

Both terminal multiplexers (screen, tmux) and keyboard-driven tiling window managers (ratpoison, dwm, xmonad) provide similar functionality. Is there any benefit in using both at the same time? What ...
6
votes
3answers
832 views

tmux after start

Can I configure tmux so it will after running tmux automatically opens two windows named src and cmd? I always type after starting it: prefix + c, prefix + ,srcENTER prefix + c, prefix + ,cmdENTER ...
1
vote
1answer
188 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 ...
2
votes
1answer
2k views

Change tmux prefix control keyboard shortcut to alt keyboard shortcut

Is it possible to change the tmux prefix keyboard shortcut ctrl+B to alt+B?
7
votes
2answers
2k views

Aliases and tmux

Aliases defined in .bash_aliases and .bashrc don't work in tmux. Can this be changed in some configuration, so the aliases work under tmux?
7
votes
2answers
3k views

Terminal 256 colors don't work through Tmux [duplicate]

Possible Duplicate: Getting 256 colors to work in tmux I want to set my terminal to 256 colors. I normally use the Gnome terminal which is shipped by default in Ubuntu but I also downloaded ...
21
votes
1answer
3k 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 ...
8
votes
2answers
601 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 ...
1
vote
0answers
245 views

How to use comma as tmux's prefix

Under screen, I used: bindkey , command to use the comma as the prefix instead of Ctrla. If I do set -g prefix in tmux, it complains saying: unkown key At first, I believed that tmux did not ...
3
votes
1answer
1k views

tmux on startup and ssh-agent forwarding issue

I've added the following lines (taken from here) to my .bashrc to automatically start a tmux session on login: if [ "$PS1" != "" -a "${STARTED_TMUX:-x}" = x -a "${SSH_TTY:-x}" != x ] then ...
1
vote
1answer
2k views

Tmux border split in rxvt

I'm attempting to connect to my Arch server running tmux from my work Windows PC. I've found that while Console2 does a decent job with most things, it's not perfect, and I get all sorts of graphical ...
6
votes
4answers
4k views

Is there a tmux equivalent of “screen -D -R”

I would like to know if there is a way to get tmux to behave like screen -D -R so I could say, have the command as a default command in Putty. These screen switches would force detach of an existing ...
6
votes
2answers
744 views

Can I make Tmux tell Vim when its pane loses focus?

I use Vim and Bash side-by-side in Tmux. I have Vim configured to autosave files as I switch between them, but I'd really like it to autosave when I switch to the Bash pane. Is there a way to get ...
37
votes
3answers
9k 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
1answer
252 views

Background script run at login interrupted when I run tmux in terminal

In ~/.profile I run a script in the background (redshift for changing the screen temperature at night time). After logging in, I can open a terminal, and run tmux. However, at this point, redshift ...
6
votes
2answers
419 views

How do I prevent tmux from wrapping around when searching?

When I am in edit mode in a tmux pane and I do a search, once it reaches the end, it goes back to the beginning. Is there any setting to prevent this?
11
votes
1answer
1k views

tmux disable confirmation prompt on kill-window

I've looked through the man pages so this might be asking in vain. I get annoyed at the confirmation message for kill-window (Ctrl-b & or Ctrl-b kill-window on the default setup). This always ...
3
votes
0answers
144 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 ...
14
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
704 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 ...
37
votes
4answers
11k 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
4k 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 ...
27
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 ...
13
votes
3answers
4k 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 ...
31
votes
3answers
6k 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
516 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
980 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 ...
10
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
694 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
381 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
970 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 ...
43
votes
12answers
28k 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.
10
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 ...
89
votes
5answers
26k 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
419 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
451 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 ...
42
votes
5answers
13k 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 ...
21
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
19k 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> ...