Talk:Tmux
New Tmux terminfo
I suggest changing all references to screen or screen-256color to tmux and tmux-256color as the new terminfo has been added to ncurses 6 (now in stable in Arch). You can find the announcement at http://invisible-island.net/ncurses/NEWS.html#index-t20150502 (the 6th point), or confirm by yourself by going to /usr/share/terminfo/t/. This mainly fixes the italic issue referenced here: https://wiki.archlinux.org/index.php/Tmux#Fix_reverse-video.2Fitalic_mode_in_urxvt. ~ Nicop06
- Agreed jasonwryan (talk) 23:57, 18 October 2015 (UTC) Reply
- Actually, it seems that the
screen-256colorterminfo is working since the upgrade to nurses 6. I suggest completly removing the section to avoid any confusion. Nicop06 (talk) 21:38, 5 January 2016 (UTC) Reply
- Actually, it seems that the
- I've been using
TERM=tmux-256colorsince the update. Overall things work, but there are some places and programs which have issues with it. The most common one is prezto (zsh config) doesn't use color for a lot of commands. I believe it fails to detect if term has color and falls back to color-less command arguments. I just filed a bug report for prezto. There were some other issues which I can't remember right now. Maybe some info notice should be added about this. MaikuMori (talk) 09:15, 6 January 2016 (UTC) Reply
- I've been using
- So it turned out it's not a bug in
prezto, butcoreutils. It's tracked here. The fix will be incoreutils-8.25. After that's fixed I see no reason to not useTERM=tmux-256coloreverywhere. My 2c. MaikuMori (talk) 21:45, 29 January 2016 (UTC) Reply
- So it turned out it's not a bug in
- Arch is using coreutils 8.30-1 now, let's move to
tmux-256color? --Noraj (talk) 11:21, 12 September 2018 (UTC) Reply
- Arch is using coreutils 8.30-1 now, let's move to
X clipboard integration
I updated the config options to be pasted into `tmux.conf` according to the new mode-table names in tmux. The old ones didn't work for me in vi-mode while the new ones do.
Can somebody check the emacs ones? I'm not sure about those. --jakobh ✉ 16:10, 1 March 2017 (UTC) Reply
Tips and tricks
Can I add this section under Tips and tricks on the wiki?
# More friendly split pane bind-key h split-window -h bind-key v split-window -v
--Noraj (talk) 11:24, 12 September 2018 (UTC) Reply
- The description should be more descriptive than "More friendly split pane" - what is it actually doing? And the comment should be in the surrounding text, not in the code block. -- Lahwaacz (talk) 13:28, 12 September 2018 (UTC) Reply
- That was what is was going to do, you can now take a look at it [1].--Noraj (talk) 18:51, 12 September 2018 (UTC) Reply
beware of 'exec tmux' if using Midnight Commander(without --nosubshell)
Because mc will run bash interactive like bash -rcfile .bashrc this means exec tmux also gets executed and thus create a small startup delay when running mc (and who knows what else). To test that mc does this, in ~/.bashrc after this line [[ $- != *i* ]] && return just add [[ -n "$MC_SID" ]] && echo "ran by 'mc' $MC_SID" >>/tmp/b and in another terminal run tail -F /tmp/b. To workaround this, only exec tmux if both MC_SID and TMUX env. vars are empty, ie. this [[ -z "$TMUX" ]] && exec tmux should probably be [[ -z "$TMUX" && -z "$MC_SID" ]] && exec tmux. Tested Midnight Commander 4.8.24-84-gcef0bb013, tmux 3.1a. Gentoo eshoes (talk) 01:27, 2 May 2020 (UTC) Reply
256 colors
As of tmux 2.1, this is now tmux, or tmux-256color.
I couldn't find the relevant change in the changelog. Further, setting this to tmux-256color didn't work for me on termite with tmux 3.1_b-1.
Although, using xterm-256color worked fine.
MrHritik (talk) 23:33, 15 October 2020 (UTC) Reply
Autostart with systemd
After setting this up, I was not able to run certain commands as shown below, apparently because I lost access to dbus. If it's not a problem, I'd suggest adding a note.
$ reboot Failed to set wall message, ignoring: Interactive authentication required. Failed to reboot system via logind: Interactive authentication required. Failed to talk to init daemon. $ $ systemctl --user Failed to connect to bus: No medium found $ $ alsamixer cannot open mixer: Host is down $ $ speaker-test speaker-test 1.2.6 Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Playback open error: -112,Host is down $ $ pactl list sinks Connection failure: Connection refused pa_context_connect() failed: Connection refused $
—This unsigned comment is by Funcrab (talk) 11:40, 17 January 2022. Please sign your posts with ~~~~!
Autostart with systemd
Got it to run for user with the following
cat /etc/systemd/user/tmux.service
</nowiki> [Unit] Description=tmux session for user %u ConditionUser=!root [Service] Type=forking ExecStart=/usr/bin/tmux new-session -s %u -d ExecStop=/usr/bin/tmux kill-session -t %u Restart=always [Install] WantedBy=default.target
—This unsigned comment is by Archie101 (talk) 12:50, 5 December 2024 (UTC). Please sign your posts with ~~~~!Reply
- ta, lomg time user - first time editorn that , this is better soln that running tmux as root... but not sure how to get the main page updated Archie101 (talk) 07:21, 6 December 2024 (UTC) Reply
- In combination with the
%Icomment inside the .service, the basic principle to set up a similar user-service is described in Tmux#Autostart with systemd after the green tip. Would you make changes to that paragraph? --Indigo (talk) 18:22, 6 December 2024 (UTC) Reply
- In combination with the
Add note VTE terminals clipboard support
I can tell from my own experience that with XFCE terminal, clipboard doesn't work inside tmux and i didn't find a way around this problem.
Affected terminals include GNOME terminal, XFCE terminal, Terminator, etc. Tmux wiki mentions this specifically. (https://github.com/tmux/tmux/wiki/Clipboard)
Maybe it's worth mentioning in #Troubleshooting or #Clipboard_integration section? Pigeon (talk) 17:32, 26 October 2025 (UTC) Reply