New answers tagged

0

Save everything: tmux capture-pane -pS - > tmux.log


5

To @terdon's point in the comments, you can simply "detach" (default Ctrl>+B D) from the session and continue it later if you'd like. If you simply close Putty, then tmux is still running on the Linux host. You can reconnect to it when you next ssh to the host, usually with tmux attach-session (alias tmux attach). Although I use WSL/Windows ...


0

While I don't remember if I've ever experienced the problem, I've been using a user service to have an "always-on" tmux server running anyway: $ cat /home/tom/.config/systemd/user/tmux-server.service [Unit] Description=tmux server [Service] Type=forking ExecStart=/usr/bin/tmux -f %h/.config/tmux/server.conf start-server ExecStop=/usr/bin/tmux ...


1

After some research, I found the solution to my problem. The reason for the killing of the tmux sessions was the default setting of KillUserProcesses=yes in /etc/systemd/logind.conf. From the man page of logind.conf, KillUserProcesses= Takes a boolean argument. Configures whether the processes of a user should be killed when the user logs out. If true, the ...


0

In my case it was .bash_profile issue for my user with which tmux session are configured. I have updated the .bash_profile for my user like below and things started working fine if [ -f ~/.bashrc ]; then . ~/.bashrc fi PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH


1

To find this, I first suppress my terminal emulator WezTerm's default key bindings in ~/.wezterm.lua, so they get passed onto the terminal: local wezterm = require 'wezterm'; return { disable_default_key_bindings = true, ... } Then I can use the following to get my escape sequences: $ showkey -a Press any keys - Ctrl-D will terminate this program ^[[...


0

Here's a zsh script Eden Berger and I wrote to do this. If any unused (no clients attached) tmux sessions exist, then tmux will attach to one of them (the first, sorted by their session id). Otherwise, a new tmux session will start. It also supports skipping tmux altogether if already in a tmux session or if SKIP_TMUX is set. I find the latter useful because ...


0

Alternatively you can disable controls of the outer tmux session. Most of the time I want to control the inner session, so I use F12 as toggle hotkey.


0

Confirm that events are being received with xev Find the device ID emitting those events with the following command: xinput --test-xi2 It will output events of this kind: EVENT type 15 (RawButtonPress) device: 2 (16) detail: 7 flags: emulated valuators: Find the device name: the device ID (e.g. (16)) maps to the device list of xinput --...


12

Your confusion comes from the fact that tmux, like all other utilities, writes error messages and other diagnostic messages to the standard error stream rather than to the standard output stream. With the > redirection, you only redirect the standard output stream, not the error messages. Likewise, when you pipe the output of a command, you only pipe ...


2

In unix, when a program starts, it has 3 file handless open: STDIN STDOUT SDERR Redirection with | normally sends STDOUT from the first program to STDIN of the second program. Errors like "no server is running" go to STDERR which typically end up on the terminal instead of in the pipe or other redirection. If you want to capture both STDOUT and ...


4

tmux ls | grep -i "windows" pipes the stdout of tmux ls into grep. The no server running on /tmp/tmux-1000/default message is being printed to stderr, not stdout. To grep both stdout and stderr, you have to redirect stderr to the same place as stdout. For example: tmux ls 2>&1 | grep -i "windows" or just redirect stderr to /dev/...


1

lock-command vlock runs vlock where the tmux client runs. Any client can be locked independently. In general the argument is a shell command, not necessarily a single executable. The following tmux command will tell apart /dev/tty* from anything else (e.g. /dev/pts/*) on the client: set -g lock-command 'tty | grep -q "^/dev/tty" && vlock' ...


1

If you want to, you can still put your overriding commands after the run of tpm. The "need" is just to ensure the plugins work as intended and so avoid spurious issues, but if you know the consequences of your commands it is not a problem. Or you can edit ~/.tmux/plugins/tmux-pain-control/pain_control.tmux, find the line tmux bind-key C-h select-...


2

I pulled this answer from my blog Switch between light and dark mode in Vim and Tmux with one command I had exactly the same problem as you, and I have the following setup: From a Tmux pane: 1a) The alias 'ol' switches both Vim and Tmux to light mode. 1b) The alias 'od' switches both Vim and Tmux to dark mode. From Vim: 2 ) 'Leader-o' toggles both Vim and ...


Top 50 recent answers are included