Questions tagged [tmux]

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.

21
votes
4answers
10k 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 ...
0
votes
3answers
2k views

What is the “control mode” in tmux?

According to man tmux to check the launch option: -C: Start in control mode (see the CONTROL MODE section). Given twice (-CC) disables echo. Then in the control mode section of the ...
2
votes
2answers
462 views

tmux status-bar #(pwd) doesn't reload

I have a problem with the tmux 2.1 status bar. As the manual explains I'd write in ~/.tmux.conf it: set -g status-right "#(/bin/pwd) %R %d/%m/%g" set -g status-interval 1 After I start tmux in ...
73
votes
13answers
74k 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.
38
votes
2answers
11k views

Tmux mouse-mode on does not allow to select text with mouse

I'm using tmux 2.1 and tried to on mouse mode with set -g mouse on And it works fine, I can switch across tmux window splits by clicking the appropriate window. But the downside of this is that I ...
4
votes
2answers
1k views

Nautilus: Open folder in terminal when using tmux

I'm using fedora 25 gnome edition, zsh shell. I can right click, open folder in terminal. I configured gnome terminal to start tmux when it gets opened. Now if I open folder in terminal, the terminal ...
0
votes
2answers
22 views

How to test if a pane exists in tmux

I'm new to tmux, i want to know how to test if a pane is closed or not by pane_id. I'm using following script to do the job right now: tmux display-message -p -t %21 >/dev/null && echo ...
4
votes
1answer
4k views

Tmux ranger integration: opening text files in new panes

Here we have some amazing tools: tmux, ranger, vim... Would be amazing to configure ranger to open the files (when text editable) in a tmux newpane? Is that easy and how it is done?
0
votes
0answers
16 views

Byobu terminal can't use tmux

I can't enable tmux feature on byobu terminal or on any terminal. I run echo $TERM and i get screen-256color When i run tmux i get this: sessions should be nested with care, unset $TMUX to ...
0
votes
1answer
20 views

tmux pane log file location [duplicate]

Where does tmux store the current pan contents? Is there any log file? I want to be able to search this log file programmatically via a script. I know we can search manually by tmux inbuilt commands. ...
0
votes
1answer
24 views

Tmux hook after-source-file running but not displaying message

I want to write a hook in tmux to show a message that reports the config has been reloaded. Here is my code: #binding a button to reload this config file bind r source-file ~/.tmux.conf #set hook to ...
0
votes
1answer
8 views

Replacement for c0-change-interval

I used to use the line below in my .tmux.conf to keep it from trying to render every line on output, and only update the screen 3 times a second. setw -g c0-change-interval 333 What's the replace ...
1
vote
2answers
374 views

In tmux.conf, set an option differently if window_index is 0?

Here's the default setting of an option in ~/.tmux.conf: set -gw window-status-format " #I:#W#{?window_flags,#{window_flags}, } " The problem I have with this is that the space character at the ...
0
votes
3answers
590 views

Tmux shortcut problem

While using Tmux, I tried to maximise the current pane using <prefix> z, and had a bit of a keyboard fail and accidently held down the prefix keys while pressing z, instead of letting go of the ...
0
votes
0answers
10 views

Tmux: Drop and detach a new session via SSH on a remote machine [duplicate]

I am trying to write a simple script that logs in to a machine via SSH, spawns a new tmux instance and then detach from it at soon as it is running. The purpose is to arm an alarm system I build using ...
31
votes
1answer
31k views

How to copy and paste with a mouse with tmux

I'm using tmux and OSX. When copying and pasting from the terminal with tmux I'm able to hold down Option and select text. However I can't get the text to stay inside the pane. So when I want to copy ...
1
vote
1answer
1k views

How can I change my tmux color scheme based on the time of day?

I just implemented a few lines into my .vimrc that changes the color scheme from SolarizedDark to SolarizedLight based on the time of day. " Solarized light during the day, solarized dark during the ...
0
votes
2answers
884 views

Why can't I resize my panes in tmux with the current bindings that I have?

I was trying to set up my key binding in tmux so that I can resize my panes without having to type the whole command. Currently I have it set up as: bind-key -n S-Left resize-pane -L 1 bind-key -n S-...
3
votes
3answers
908 views

shell command `tmux` throws `can't use /dev/tty` error

I just switched from using terminator to termite today. I also Installed Fish and oh my fish, Spent a couple hours configuring everything, but when I went to start a tmux session to get some work ...
0
votes
0answers
12 views

How do I split tmux in VMWare Fusion?

I am using Ubuntu 18.04 running inside VMWare Fusion. I have installed tmux inside the guest OS. Now, I want to split the terminal into two panes. If I use the following options to split the ...
12
votes
4answers
4k views

mirroring a pane between two windows

Is it possible to have the same pane appear in two different windows of a single tmux session? I typically have a single horizontal split in my main window with vim in the top pane (about 80-90% of ...
35
votes
2answers
25k 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 the ...
1
vote
1answer
33 views

Tmux crashing tty_clamp_area

using tmux as my dev environment. I have a standard split with vim on top, a three panes bellow that, one running npm start, one running the nodejs backend and the other one for stuff like git status. ...
0
votes
1answer
37 views

setting `xterm-keys` in `tmux` affects Shift-Enter in `vim`

I enabled xterm-keys in tmux in order to have normal xterm key bindings like whole-word movement using the Ctrl-arrow keys. However, by enabling xterm-keys it causes Shift-Enter to have undesired ...
54
votes
5answers
19k views

How do you hide a tmux pane?

I have 3 panes in my tmux window: -------------------------- | | 2 | | | | | 1 |----------| | | 3 | | | | ----...
0
votes
1answer
37 views

Tmux middle click paste buffer is only working on one pane

I use tmux 1.8 with putty. I often copy stuff to the tmux paste buffer using mouse select and then paste using middle click. However, on a new computer, the following issue is happening: when I click ...
4
votes
2answers
4k views

Fixing scrolling in nano running in tmux in mate-terminal

The problem: I open a terminal (in Linux Mint, so mate-terminal) zsh is the shell Then I run tmux Edit a file with nano Scroll up and down that file with the cursor Issue: When scrolling down in nano,...
14
votes
2answers
12k 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 ...
2
votes
2answers
34 views

How to detach tmux when the shell exits but not when killed from session overview?

Every terminal window I open automatically attaches to a new tmux session. Closing the shell inside such a tmux session should detach the tmux client for the terminal window to close. This can be done ...
0
votes
1answer
23 views

Exit alternate screen after crashed ssh-tmux session

After I get disconnected from my tmux session over ssh (I have to use the ssh ~. command to exit), the mouse start displaying control characters like 80;31M65;80;31M65; when I click or turn the wheel. ...
1
vote
1answer
2k views

tmux, urxvt, and copy-and-paste woes…

I am running tmux inside urxvt. I would like to select and copy text using the left mouse button and paste it using the middle mouse button -- I am very old school. I did get tmux-yank almost working ...
14
votes
2answers
6k views

Set the active tmux tab color

Is it possible to change the background of the active (current) tmux tab? I'm using tmux 1.9 on Ubuntu 15.04. $ tmux -V tmux 1.9 I tried to do: set-option -g pane-active-border-fg red But the ...
0
votes
1answer
48 views

Switch gnome-terminal with tmux - but completely

Ubuntu, xorg, i3. The goal is to have tmux as the default terminal. Easily achieved as the internet is full of great tips like [[ $TERM != "screen" ]] && exec tmux in your .bashrc. This ...
1
vote
1answer
15 views

Different tmux prefixes for different machines

Is it possible in .tmux.conf to set the prefix to different things depending on the current hostname?
5
votes
4answers
1k views

How to get TMux to only show windows when using choose-tree?

I recently installed the latest version of TMux and when I tried to switch between my windows (control-a w, or choose-tree) I was greeted with 3 entries instead of 2. Instead of only showing my ...
0
votes
0answers
33 views

Tmux default directory is '/' the first time after reboot

When I start tmux the first time after a reboot, the default directory is '/' (also newly created tmux tabs have this default directory) and in the place of the tmux session number ('0' in the picture)...
0
votes
1answer
131 views

How do I enable tmux mouse support?

I have put set -g mouse on set -g mouse-select-pane on in my .tmux.conf file and then I open tmux and create a new pane and I cant switch pane with mouse. is there something else I need to ...
1
vote
1answer
341 views

Can multiple users issue commands simultaneously using tmate with separate cursors in the same session?

I've just installed tmate and tmate-slave on a VM and am wondering if when more than one user is part of the session, can tmate allow both users to work in synchronous mode, meaning each has their own ...
0
votes
0answers
26 views

Easier way to run remote and monitor remote commands

I'm currently leveraging Ruby in a docker image to run some commands on my local Linux system via SSH and Tmux. However, this isn't feasible since I can't figure out a way to actually monitor the ...
0
votes
2answers
68 views

Open a tmux session and then change to different user without password prompt

I am trying to create a script that opens a new tmux session and then runs a command inside that tmux session as a different user. The purpose of this is to create a new tmux session for a game ...
1
vote
0answers
31 views

.zshrc configuration doesn't set ENABLE_TMUX to true

In my .zshrc, I have ENABLE_TMUX="TRUE" for one of the lines. This doesn't seem to work, as tmux never launches on a new shell, and the environment variable ENABLE_TMUX is always false when I start a ...
0
votes
1answer
23 views

TMUX key binding dependant on position in copy mode

I want Pagedown to exit copy-mode if it is pressed at the bottom of the scrolling page. I have tried using if-shell with tests involving #{scroll_region_lower} and #{scroll-region-upper} but they don'...
1
vote
2answers
242 views

How can I fix tmux not showing messages at startup?

I have a command in my .tmux.conf file which checks to see if a directory exists, then displays a message if it doesn't; and another command which tries to run a shell script. file: ~/.tmux.conf # ...
-1
votes
1answer
43 views

Tmux: how to specify session in new-window

When I run tmux new-window from a script outside of my current tmux session, how can I specify which session the new window should be associated with?
0
votes
1answer
52 views

How can I get “tmux choose-tree” to highlight in a monochrome terminal?

I'm using tmux 2.9-rc (built from source) on Ubuntu 18.04 in an xterm window. I normally run xterm with color disabled (xterm -cm). It can display text in bold and reverse video, but not in color. ...
0
votes
0answers
16 views

How to trigger tmux copy-mode using bash `bind` command

I'm trying to trigger tmux copy-mode using bash builtin bind command only in readline normal mode(vi-move) using this: bind -m vi-move -x '"vv": "tmux copy-mode"' its working but the problem is, it ...
121
votes
7answers
109k views

Copy text from one tmux pane to another (using vim)

I have two files opened in vim, each in one tmux pane. I would like to copy let's say 10 lines from one file to another. How can I accomplish this not using the mouse's Copy -> Paste ?
0
votes
1answer
16 views

Extract window to another session in tmux

I can do it in two commands: new-session - creates new session. move-window -t {session-name}: - moves current window to session 1. I'd like to bind those to a key, but I haven't found a way to ...
16
votes
2answers
6k views

Can't use mouse properly when running vim in tmux

I'm running VIM in tmux, When I'm try to select a range of texts in VIM, the mouse kept resetting its position, thus I can only select one line (the last line where mouse occurs). Does anyone know ...
0
votes
1answer
12 views

Why tmux always change my first window's name to bash after reloading

I have tmux-resurrect installed so I can save and reload windows. I have about 8 windows in 1 session. After save and reload. All windows' name are correct except the first one, it shows 0:bash- How ...