New answers tagged

1

Checking the source code is the way to go: tmux only looks at the system's notion of the size in check-size, and before that, when attaching to or creating a session, it starts with 24x80. The latter is configurable with the command-line -x and -y options. The manual page lists this in new-session: The new session is attached to the current terminal ...


1

The manual page is not clear, but reading the source code helps: take a look at input-keys.c, and you will see the keys, listed in a table. the table is used in the same file, in input_key near the top of the file, there's a comment: /* * This file is rather misleadingly named, it contains the code which takes a * key code and translates ...


0

The problem is that the color theme asks for more color than exist in the tmux terminal description, and vim is using bold to replace some of the missing colors. Rather than set -g default-terminal "tmux" use a terminal description which has a comparable number of colors, e.g., set -g default-terminal "tmux-256color" If your terminal database has "...


1

tmux (like GNU screen) works by translating the features of your actual terminal into an (often different) internal terminal. They do this to allow you to connect a session on different terminals at the same time, or at different times. When that works well, you will see the "same" text no matter where you are connecting from. Not all terminals support ...


2

Smooth/frictionless/inertial scrolling is not supported by current tmux, mostly for reasons beyond its control. tmux receives its mouse input through terminal control sequences, so it's limited by what the terminal gives it. A popular reference for terminal sequences is console_codes(4), but that doesn't mention the mouse wheel at all. However, XTerm ...


1

The tmux utility's own show-options command with the -g flag will dump all the globally set options in the current tmux session (i.e., tmux has to be running to use it). So if you're in a tmux session, your ~/.tmux.conf file is empty, then the following will dump out the default settings: $ tmux show-options -g >tmux.conf-default Some options are set ...


1

There should be several example configuration files in either /usr/share/doc/tmux/examples or /usr/share/tmux/. You can copy any of those over to ~/.tmux.conf to test out. Alternatively, you could create a ~/.tmux.conf with the default settings by using this command from within tmux: tmux show -g > ~/.tmux.conf This command works with tmux version 1.8....


1

When you start another window, it runs concurrently with the original window that executed tmux new-window. There's no way for the original window to know when the new window is done starting up. The best you can do is estimate how long it takes for it to start up, and sleep that long in the original window before enabling visual-activity and monitor-...


0

You should use the -g (global) option in this line: :set-window-option xterm-keys on making it :set-window-option -g xterm-keys on The tmux manual is not very clear, saying of -g: If -g is specified, the global session or window option is set. With -a, and if the option expects a string, value is appended to the existing setting. The -u flag ...


2

The most optimized solution to troubleshoot any detached script using tmux will require you to use the following option within your triggering script: #!/bin/bash # this script is called "sess" tmux new-session -d -s sess1 # this statement is a life-saver for tmux detached sessions tmux set-option -t sess1 set-remain-on-exit on # In my case running the ...


1

When you have nested tmux sessions, it is the first ("outermost", oldest) that gets the Ctrlb+d key sequence to detach. You can set up tmux to send its prefix key to the "inner" session like this (in your ~/.tmux.conf): bind-key b send-prefix This will send the prefix Ctrlb (or whatever you use as prefix) when you press Ctrlb+b, so Ctrlb+b is basically "...


0

It could be a conflicting prefix key, so you could try changing this. Tmux allows for this, and you can make it persist by creating a ~/.tmux.conf file. The line to add to the conf file would be something like this: set-option -g prefix M-a Which would change your prefix key to Alt + A If you don't want these changes to persist, you can just run that ...


1

There are unrelated differences between Red Hat 6 and Ubuntu 16 for the screen-256color entry: the latter adds dim and omits initc. Neither of those changes is related to cursor-keys. Presumably the value of TERM outside tmux is xterm. There are also unrelated changes between the two systems for the xterm entry (the cursor color extensions mentioned in ...


0

You don't have to change your key bindings. Whilst the pane you wish to move has focus, type Prefix then :join-pane -t :1 where 1 is whatever the destination window's number is in the same session. You can move it to another session by prepending its name like project:3. For me join-pane tab-autocompletes from j. Add an -h or -v switch to the command to ...


4

tmux sets the $TMUX variable to point to the socket, so you can do something like if [ -z "$TMUX" ] then .... fi The stuff inside the test will only be run if the variable is not set - ie you're not already inside a tmux session.


1

Running these two commands will give this mapping: prefix, /,/ (you'll need to hit / twice.) which will put you into copy mode and then search-backwards bind-key / copy-mode bind-key -t vi-copy '/' search-backward Mapping / to search-backward causes you to (obviously) lose forward search which you might want because tmux sometimes puts the cursor at the ...


2

You can do this in two ways: Use the sleep method. I see nothing really wrong about using sleep apart from sometimes failing if you choose a too short time. To fool-proof it, use while ! tmux has-session; do sleep 1; done or while ! tmux has-session -t alpha; do sleep 1; done Use something like xtoolwait that starts an X client (your terminal emulator)...


0

tmux allows you to create "session groups" - multiple sessions that can all attach to the same set of windows. (With thanks to https://gist.github.com/chakrit/5004006 :) In the left terminal, create a new session+window group. tmux new-session -s left Split it into panes as usual. :split-window -v In the other (right-hand) terminal, connect to ...


0

You will want to start a separate tmux session in each terminal, and then split each session's single tmux window into two panes vertically. So, in each terminal: $ tmux new-session \; split-window -h Or shorter, in each terminal: $ tmux new \; splitw -h You need two sessions, because with one session, the two terminals would always be synchronized ...


0

Can you not do the low-tech method of resizing one terminal (by dragging edges) to cover both monitors, such that the centre divider is at the boundary of the two monitors?


0

tmux looks at the terminal description to see if it can set the title: if the terminal description has the ncurses extended capability XT or if the terminal description has the terminfo capabilities fsl and tsl (from- and to-status-line). ncurses' terminfo database has defined XT for xterm entries for some time (since 2010); there is a discussion of the ...


0

The tmux approach is to use three sessions: an outer session for the panes, an inner session for the windows (you can attach to this from one pane), a secondary view onto the inner session (for the other pane). Yes this is UNIX philosophy gone mad. Let's get started. # Create a session to hold the multiple windows $ tmux new-session -s inner <...


1

The reason why an event-script fails to send a "growler" message is that mcabber closes the standard input, output and error streams when it runs an event command. You can see this in hooks.c: if ((pid=fork()) == -1) { scr_LogPrint(LPRINT_LOGNORM, "Fork error, cannot launch external command."); g_free(datafname); return; } if (pid =...


1

It is working now. Here is a screenshot using the current imgcat script along with iTerm 3.0.2 tmux 2.2 (MacPorts) on OSX El Capitan (10.11.5): The developer is very active, and if it was not working last September there may be a related bug-report/issue number (there are many open issues mentioning imgcat).


0

The various comments about the TERM setting, etc., do not appear to address the actual problem. The most likely explanation is a problem with permissions which prevents tmux from opening the pseudo-terminal connection. For instance, someone may have done a chmod or chown which broke the program. You can see whether this is the case by looking at the ...


5

tmux \ new-session 'compass watch /path/to/project1/compass/' \; \ split-window 'compass watch /path/to/project2/compass/' \; \ detach-client The new-session command (which creates a new tmux session) and the split-window command (which splits the current window into two panes) in tmux takes optional shell commands to run. The detach-client ...



Top 50 recent answers are included