Skip to main content

All Questions

Tagged with
0 votes
1 answer
59 views

how to source tmux session_id into tmux

I have this: export session_uuid="$(uuidgen)" remove_session() { tmux kill-session -t "$session_uuid" } export -f remove_session trap remove_session TERM INT SIGINT SIGTERM ...
Alexander Mills's user avatar
0 votes
2 answers
1k views

Ubuntu creating tmux session from shell results in "Error connecting to tmux"

I have a server running in EC2 and every time I need to deploy a new version of my app I run the following script: #Kills tmux and kills <my-app> process pkill -f tmux pkill ./my-app #Removes ...
Heinzen's user avatar
2 votes
0 answers
307 views

How can I save the scrollback history of every window/pane in a tmux session?

I'd like to save the complete scrollback history of every window/pane in a tmux session into one file per pane. I know how to do it in the active pane: tmux capture-pane -pJ -S - > log.txt But, I ...
mesosphere's user avatar
2 votes
0 answers
933 views

How to redraw the Tmux client?

How can I redraw the Tmux client, when artifacts appear in the status line? I have configured the following (right) status line: set -g status-right "#[fg=green,bright]#{?client_prefix,#[reverse]&...
Shuzheng's user avatar
  • 4,601
5 votes
1 answer
7k views

Launch tmux with a command in the background without stopping said command when tmux stop running

So, I want to launch a shell command through tmux, but in the background and detaching from said tmux session...so I do it like so: tmux new-session -A -s myprogramsession \; send -t myprogramsession &...
Nordine Lotfi's user avatar
0 votes
1 answer
5k views

How to reset the current Tmux session?

I sometimes experience a state of tmux, where Prefix-c stops working although Prefix- still works for other commands. Also, in this state, key bindings like bind -T copy-mode-vi y send-keys -X copy-...
Shuzheng's user avatar
  • 4,601
1 vote
1 answer
3k views

why is shell (new terminal, new tmux panes/windows) slow to load?

When I open a new terminal it takes a couple seconds for the shell to load, when I open a new pane or window in tmux it might even take a second longer. The delay is about 3 seconds. I'm using zsh ...
alec's user avatar
  • 1,818
1 vote
0 answers
138 views

How to update env before every command (literally)

I use many different VPNs for work and switch between them often using a script that sets up $http_proxy and $https_proxy for me. The issue is when I have a terminal open these variables won't update ...
cprn's user avatar
  • 1,025
0 votes
1 answer
3k views

How to run a Tmux command across all panes in a single or multiple sessions?

I sometimes want to run a Tmux command across all panes in a single or multiple sessions to e.g. clean up my working environment. An example would be to execute this Tmux command: # Clear screen bind ...
Shuzheng's user avatar
  • 4,601
0 votes
0 answers
173 views

How can I copy (yank) text in `copy-mode-vi in` Tmux, while the terminal is outputting text?

I often want to copy (yank) text in copy-mode-vi, while the terminal is outputting text. However, it seems impossible to reliably mark the text, while the terminal is not still (i.e., it outputs text ...
Shuzheng's user avatar
  • 4,601
1 vote
1 answer
1k views

Opening multiple screens in a linux terminal using a script or command

I want to open screens vertically and horizontally. I have used the following: tmux ctrl + b then % ctrl + b then " screen ctrl + a then S ctrl + a then | But, is it possible to open a screen ...
Vikash Kumar's user avatar
20 votes
1 answer
9k views

What's the effect of `escape-time` in Tmux?

I've set the escape-time option in ~/.tmux.conf, since it's present in many Tmux configuration files. However, I don't really see any effect after setting this option. In particular, if I set the ...
Shuzheng's user avatar
  • 4,601
2 votes
1 answer
2k views

Is it possible to split a command in tmux.conf across multiple lines?

When using the Tmux's if-shell command in tmux.conf, I end up with really long commands, like the one below for integrating Tmux with the system's clipboard on macOS and Linux: if-shell "[[ $(...
Shuzheng's user avatar
  • 4,601
2 votes
1 answer
3k views

How can I run a Tmux command based on the current operating system?

How can I run a Tmux command based on the current operating system? I want to use the same Tmux configuration file on both Linux and macOS, but some configuration like integrating Tmux with the system ...
Shuzheng's user avatar
  • 4,601
2 votes
0 answers
490 views

Why does colors in Tmux's status line look "dim" compared to the shell's prompt?

I use Terminal.app configured as xterm-256color. Tmux is configured as: set -g default-terminal "screen-256color" and Bash is configured with the prompt: PS1='\[\033[01;32m\]\u@\h\[\033[00m\]...
Shuzheng's user avatar
  • 4,601

15 30 50 per page
1
2 3 4 5