New answers tagged

0

You're running into two problems: tmux tries to get the current working directory from the current process group (returned by tcgetpgrp(3) or the TIOCGPGRP ioctl), so variables such as #{pane_current_path} will always reflect temporary directory changes in the currently-running command. tmux version 1.8 doesn't expand any #{variables} in the -c argument to ...


1

Use both: A tiling window manager, and a terminal multiplexer. Combine both their capabilities and advantages to obtain an even better synergy. On my i3 setup I regularly display several terminals at the same time, but all of them connected to the same tmux session, so I can display all tmux windows in any of the terminals. In effect, I use the tiling ...


0

For some reason, it was just a Vim issue: when started in tmux, it loaded default colorsheme, but when started from plain terminal, it loaded desert colorscheme but still calling it default when asked via :colorsheme. Forcing :colorsheme default resolved an issue, so I added colorsheme line in my ~/.vimrc and now it's OK. I have no idea why Vim was doing ...


0

You can keep the terminal open by following the command with something that waits for user input: tmux new-window 'make ; read' If your shell doesn't support the read builtin, you could use eg. sed -n q.


0

Put everything in a script like this: #! /bin/bash # su -c '/usr/bin/tmux new-session -s "all" -d' tmux send "path of Program 1" C-m tmux rename-window "Program 1" tmux new-window tmux send "path of Program 2" C-m tmux rename-window "Program 2" tmux new-window tmux send "path of Program 3" C-m tmux rename-window "Program 3" tmux attach It will start a ...


1

Add this to ~/.tmux.conf: bind-key 0 if-shell 'tmux select-window -t :0' '' 'new-window -t :0' This will first attempt to switch to window 0, and if that failed, create it. Repeat for 1-9.


1

just provide the directory you want manually when you create the split :split-window -c "/dir/you/want" e.g. <prefix>,:, split-window -c "/var/lib/apt" Explanation split-window is the tmux command to create a split, it takes alot of options to allow you to specify size, string interpolations as well as -c to specify working directory. from man ...


1

Ok, so it appears this was an issue with the Gnome Dropdown Terminal extension. Under settings > Terminal, I had a custom command setup as "tmux". Removing this solved the issue. When opening a dropdown terminal now, I just run "tmux" manually, and I am able to escape the weird suspended mode using the "FG" shortcut as recommended.


1

You probably ended up typing Ctrl-Z which suspended tmux. Try typing fg, then enter to continue.


2

The question (and suggested answer) are a little obscure, but what is being described is mutt's use of the default color feature of ncurses (or slang). If your mutt color scheme uses the word "default" for the foreground or background, then at runtime mutt will ask ncurses/slang to use the terminal's default color. Whether in an application such as mutt or ...


1

If you have the GNU version of more installed: more -d -f -10 foo This displays the file foo 10 lines at a time, pausing with a prompt messsage after each 10 lines. Press spacebar or Enter at each pause to display the next 10 lines. You can also press h or ? at the more prompt to see more's other capabilities. see man more for more details. BTW, if ...


1

You can always, at the end of your process, send the special "alert" or bell character, eg with $ echo -en '\a' and this should make the outer tmux session window beep or flash if you configure your terminal for a visible bell. On the inner tmux you might need to have the bell propagated with set-option bell-on-alert on


0

Assuming Ctrl-B is your binding key: Ctrl-B + % Or if you want use this in your .tmux.conf: split-window -h


2

From here you can unbind the key combination in byobu: Create a file ~/.byobu/.tmux.conf with (or add if the file exists): set-window-option -g xterm-keys on Then add the following to ~/.byobu/keybindings.tmux: unbind-key -n C-Left unbind-key -n C-Right


0

A display of localhost:10.0 is usually not the real display but an intermediate ssh process that is designed to allow you to use X11 windows after doing ssh -X somehost. So you should not usually set DISPLAY to it by hand as it will only work through the ssh tunnel if it still exists. A display of localhost:0.0 is a tcp connection to the X11 server on the ...


3

C-b c already has a standard binding which it might be wise to leave unchanged. Choosing another character, eg C-b C you can setup a binding in your ~/.tmux.conf file as follows: bind C send-keys -t.- 'mvn install' Enter The -t.- means "the other pane". Enter stands for the key of that name, i.e. the newline at the end of the command.


0

Another solution to this, which doesn't require moving from sshd.socket to sshd.service, is to start tmux server as a systemd service [0]. This way, the tmux server is already running when you SSH into the server, instead of spawned by the tmux command in SSH, thus won't be killed. [0] https://wiki.archlinux.org/index.php/tmux#Autostart_with_systemd


0

I solved the problem by writing a simple python script to replace the ANSI codes with tmux color variables. #!/usr/local/bin/python s = raw_input("") s = s.replace('\x1b[32m', '#[fg=colour10]') s = s.replace('\x1b[93m', '#[fg=colour11]') s = s.replace('\x1b[0m', '#[fg=colour255]') print s I just pipe the output to the script: istats | grep "CPU temp" | ...


0

What is start-directory used for? The start-directory is used to set the initial directory of the session/window/pane. If you don't specify it, $HOME is used. Does tmux itself use start-directory for anything at all like to store temp files or anything of this nature? No Does tmux use start-directory value to set the current ...


0

This is a bug in Terminal.app which has been noticed by others, e.g., in Any way to fix screen's mishandling of line wrap? (Maybe only Terminal.app) I can reproduce the effect using bash+tmux, and capturing the text sent to the screen see that tmux is setting the scrolling margins to exclude the last line on the screen before updates that might cause a ...


1

What you are asking does not seem to be developed on linux yet : Terminator has an open issue, somebody seems to be working on it actively : https://bugs.launchpad.net/terminator/+bug/1301605 Gnome-terminal doesn't seem to have any support. No bug has been filed related to this feature anyways : gnome-terminal bugs Konsole neither : ...


0

On OS-X with tmux version 2.2 or later the following will work: bind-key -t emacs-copy MouseDragEnd1Pane copy-pipe "pbcopy" bind-key -t vi-copy MouseDragEnd1Pane copy-pipe "pbcopy"



Top 50 recent answers are included