Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

6
votes
0answers
461 views

Monitor exit code in tmux

Is there a way to update tmux window attributes based on command exit status? Similar to activity monitoring, I would like the title to change color when a command exits, say, green for success and ...
4
votes
0answers
290 views

tmux killed when connection abruptly closed by remote host, but survives when logging out manually

On a host where I was attached to a tmux session, the connection was closed after ten minutes of inactivity: Connection to somewhere.uk closed by remote host. After logging back in, tmux is no ...
4
votes
0answers
406 views

Getting Alt to Work in the Terminal with Tmux and Vim

I'm trying to make Alt + h/j/k/l switch tmux panes and vim windows. Yet for some reason my terminal (xfce4-terminal) and and Alt do not play nicely with each other. I got Alt + h/j/k/l to switch ...
4
votes
0answers
73 views

tmux blocks for certain commands

I am trying to understand why this program behaves differently depending on Y: #!/bin/bash rm -f /tmp/par21d9I.tmx mkfifo /tmp/par21d9I.tmx; tmux new-session -d true\ ...
4
votes
0answers
520 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
72 views

Can I ask Tmux to immediately exit copy mode and paste the content when you yank?

I am using vi mode for my tmux. I mapped 'enter copy mode' to M-0. This is really convenient: just my left thumb on left-Alt and my right ring finger on 0 after that , i navigate with vi keys. When I ...
3
votes
0answers
143 views

How to reload tmux window in faster way

I don't have root in the OS and sometimes t or tt can reload old tmux window. But I wonder how to find how many tmux sessions in OS and reload it in faster way? xx@bsa0483:~$ t ls 0: 3 windows (...
3
votes
0answers
58 views

Tmux scroll in readonly

Is it possible to scroll up in read-only mode of tmux? I have scripts that run for a very long time, and I do not want to spoil it by Ctrl-c, while checking the output.
3
votes
0answers
1k views

tmux select window with Alt<number>

In tmux to select a window, the default behavior is C-b <number>. I would like to avoid the prefix by using alt+ for a faster selecting. I did it for the next and previous window, and it works: ...
3
votes
0answers
1k views

Bind ALT key in Tmux to move across panes

I'm using Ubuntu 14.04 and I would like to bind ALT + <hjkl> in tmux to move across splits. I've seen this plugin that allows you to move across panes with CTRL + <hjkl> but I would like ...
3
votes
0answers
135 views

Is it possible to share the tmux buffer across sessions?

I typically have 2-3 tmux sessions running on my server, and almost always have 2 up at a time, 1 on each monitor. Occasionally I want to take something I copied from one session and paste it into ...
3
votes
0answers
476 views

GNU screen :fit equivalent in tmux

I'm experiencing this problem where I've attached a single tmux session at multiple terminals with differing console sizes. Is there a solution to rid of the view-port without having to disconnect ...
3
votes
0answers
250 views

Simulating GNU Screen's shelltitle in tmux

I'm trying to simulate GNU Screen's shelltitle feature in tmux. I have the following in my ~/.bashrc: if [[ "$TERM" == screen* ]]; then SCREEN_ESC='\[\ek\e\\\]' else SCREEN_ESC='' fi PS1="\...
2
votes
0answers
33 views

tmux key bindings don't work the same on mac vs linux

I have the following in my Tmux.conf: 30 # switch panes using Alt-arrow without prefix 31 bind -n M-Left select-pane -L 32 bind -n M-Right select-pane -R 33 bind -n M-Up select-pane -U ...
2
votes
0answers
64 views

how to send notifications to clients that connect to the same tmux session?

I have a python script running on a server (let's called box A) inside a tmux session. I ssh into box A from Box B and connect to this tmux session. My question is how do I send some kinds of ...
2
votes
0answers
141 views

Issue setting environmental variable in tmux and screen

Whenever I use Tensorflow (a python library) from within a tmux or screen session, I have to manually change the environmental variables. Specifically, I have to type export PATH blah blah blah and ...
2
votes
0answers
123 views

Execute command on current tmux session when attached to a window group

I usually use two tmux sessions that share a single window group. My problem is that panes remember the session they were created from, and a tmux command executed in a shell always acts on the parent ...
2
votes
0answers
124 views

Change tmux status bar if process is running

I was wondering if it's possible to change text in the tmux status bar (or BASH shell prompt as an alternative) if a specific process is running. I would specifically like an indicator to appear if ...
2
votes
0answers
234 views

tmux detach pauses process

My server stops processing requests as soon as I detach from the tmux session that runs my RESTful API. How can I prevent this? I'm following the steps on this answer: https://askubuntu.com/...
2
votes
0answers
244 views

dualhead with tmux and two xterm windows

I'm running a dualhead system. Unfortunately, my monitors do not sport the same resolution, so I can't "just" use a huge xterm window spanning both screens. Also I imagine that it would be hard to ...
2
votes
0answers
331 views

Excessive CPU usage with vlock as tmux lock-command

I am running tmux, configured to lock my sessions via /etc/tmux.conf: set-option -g lock-command "/usr/bin/vlock -c" set-option -g lock-after-time 300 (The aim is to replace GNU screen -- to see if ...
2
votes
0answers
222 views

“gnome-terminal -e tmux ./” keeps opening terminals forever

I recently asked this question. I won't ever use the first method. gnome-terminal -e tmux ./ if I put that in .zshrc or .bashrc (both shells, same problem). If I use that, the terminal will keep ...
2
votes
0answers
860 views

Load additional history in tmux scrollback

If I'm monitoring log output in tmux and see something that I want to inspect as it scrolls by, I hit Ctrl-b [. I can then move around in the scroll buffer. When I am finished, I go to the end of the ...
2
votes
0answers
219 views

Tmux status bar flashes command from #() before displaying result

I currently use the following command to display the current git branch or mercurial bookmark for the pane's working directory. It works correctly as far as I can tell, but just before it computes ...
2
votes
0answers
202 views

Run server program and allow user to attach to it using SSH

What I'm trying to do is run a program at startup (a game server in this case, started using systemd) and allow a specific user to remotely "attach" to it using SSH. Currently I have it set up to ...
2
votes
0answers
62 views

Create a kiosk with tmux

How can I configure tmux such that the user in a session can not do anything other than interact with the programs in it and detach from the session? I've bound a key to detach, but need a way to ...
2
votes
0answers
372 views

Effectively copy pasting (kill/yanking) with emacs running in tmux on Mac OS X

I am attempting to run emacs from within tmux (with emacs keybindings to avoid context switching) on Mac Os X and am having a real hard time getting copy/paste to work right. I am also attempting to ...
2
votes
0answers
150 views

Copy between tmux windows on a server from emacs

I am using emacs in one of my tmux windows on a server, when I yank within emacs (say c-k) text how do I make it available to other tmux windows. Cmd-c and cmd-v have buffers of my laptop. I would ...
2
votes
0answers
318 views

Bash command history stops working after starting new tmux session

My bash command history stops working after starting a new tmux session. No previous commands when typing up, down, reverse search, no output from running history. I've confirmed that this happens ...
2
votes
0answers
482 views

Tmux: Unzoom pane when switching to another pane

In tmux, prefix + z toggles the active pane between zoomed / unzoomed. Also, the tmux-pain-control plugin allows moving to another pane (same window) with prefix + i/j/k/l. Now, when from a zoomed ...
2
votes
0answers
361 views

Detach from tmux and rotate to ssh without dropping exec?

I've been using tmux launched by default as part of my shell at all times for some time now and find it very convenient. At the same time ssh'ing from inside tmux to another system is not ideal ...
2
votes
0answers
701 views

Copy text in byobu when the mouse is “off”

I recently started using byobu with tmux as a backend. I have learned that AltF12 toggles "mouse mode" off and on. When "mouse mode" is on, I can select text with my mouse and paste it with the middle ...
2
votes
0answers
210 views

Unbind c-n and c-p from tmux

I want to totally unbind the next-window and previous-window command from tmux, here is what I have in my tmux conf unbind C-n unbind n unbind C-p unbind p It works well on ubuntu, but on Mac it ...
2
votes
0answers
1k views

Binding mouse buttons in tmux

Has anyone managed to bind mouse buttons to custom functions in tmux? According to the manual this should work: bind-key -n MouseDown2Pane paste-buffer This should let me take text that was ...
2
votes
0answers
127 views

tmux command to move pane to edge of window?

In Vim, you can move a window to an edge of the viewport with H/J/K/L. Vim will make sure the window occupies the whole edge and resize/shift the other windows around it. Is there something similar ...
2
votes
0answers
341 views

Chaining tmux configuration commands using the “run” command

In a previous question, I asked how to export dynamically-named buffers from tmux. The accepted answer worked perfectly. Having implemented this solution, I attempted to extend it to provide some ...
2
votes
0answers
159 views

Forwarding C-c to a remote tmux session

I have bind C-c new-window (and other similar bindings, but only C-c is giving me an issue) in my .tmux.conf. On a local tmux session, the binding works as expected, but in a remote tmux session(over ...
2
votes
0answers
502 views

Tmux hangs on first start

I am running Tmux on a OSX (brewed tmux), and everytime I boot my computer, the first time I start tmux, it hangs. Doing a CTRL + T to check it's SIGINFO, gives me "waiting..". To fix this, I need to ...
2
votes
0answers
949 views

Powerline bash prompt not colorized in tmux

The bash/zsh commandline prompt is not displaying colors in tmux, even though I managed to get the powerline itself working (with colors). The prompt works fine in pure bash/zsh. I am getting the ...
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 ...
1
vote
0answers
53 views

I3 how to auto start (when i3 launches) tmux with irssi

Every time i launch the computer i want an TMUX IRSSI window to be launched. i3/conf: exec --no-startup-id irc irc script: #!/bin/sh tmux new-session -n "IRC" -d 'irssi' tmux -2 attach-session -d ...
1
vote
0answers
47 views

tmux session nested by starting tmux from script tmux.sh based on example on wiki.ubuntuusers.de/tmux/

I used the tmux.sh example from https://wiki.ubuntuusers.de/tmux/#Bedienung . Now I get a message "sessions should be nested with care, unset $TMUX to force" every time I start 'tmux'. But as I ...
1
vote
0answers
21 views

Binding CTRL+Right and CTRL+Left in tmux to mimic bash behaviour

Under bash, if I use the key combination CTRL+< or the combo CTRL+> within a whitespaced string, the cursor will jump from word-to-word, either left or right. Under tmux this behavior is not ...
1
vote
0answers
207 views

How to uninstall, remove, or disable powerline for tmux?

Running Ubuntu 18. I configured tmux with powerlines and would like to reset back to the default look. I have tried removing all the things I remember related to powerline, the pip install, plugin ...
1
vote
0answers
221 views

How can I use a mac to scroll and copy-paste text on the tmux via ssh?

I always use macos Terminal.app to control my ubuntu servers via ssh, and I need to use tmux to keep my program running in background. Now, I know how to configure the tmux (on my ubuntu servers) to ...
1
vote
0answers
33 views

Shared and non-shared history together

Using zsh (in tmux), I would like to access the session history with Up and the shared history with Shift+Up (or similar). Does anybody know how this could be achieved?
1
vote
0answers
193 views

Tmux: check exit code of command that was sent by send-keys

I have these commands in a zsh script: tmux select-pane -t 0 tmux send-keys 'repeat 5; do print This is a test; sleep 1; done' Enter The tmux's send-keys itself just sends string to the pane but ...
1
vote
0answers
32 views

make logical screen larger than physical screen?

In tmux or screen or other, is there a way to make the logical screen larger than the physical screen - so you can (1) scroll around to see the whole screen, and (2) view different parts of the ...
1
vote
0answers
67 views

Export vars env to tmux's window/session/pane's env

Is there any way to export/upgrade list of variable env from a file or something to tmux's window/session/pane? Here I have to manually source .bashrc to update new var env to each tmux's pane.
1
vote
0answers
140 views

Is it possible to fork the current pane in tmux and put it in a new pane?

Often I have set up some temporary environment variables/modules and I would like them to persist as I create a split in Tmux. Is it possible to fork the current running program (i.e. bash) and put ...