When I copy a selection from tmux with a window split, my screen fills up with garbage characters. Depending on the size of the selection, it could be a lot, or just one line. The following images demonstrate:

Selection Area

Then after hitting to make the selection:

enter image description here

Notice all the garbage characters on the right pane.

How do I get rid of this behavior?


There is an option set-clipboard that will try to copy your selection to the x-clipboard with an escape sequence.

:set-option -s set-clipboard off

gnome-terminal does not support this method of using the clipboard, which is the default terminal in Ubuntu.

  • This actually bothered me for a long time (years), and I have finally run across the answer through trial-and-error and running byobu in an xterm. I noticed when I opened byobu/tmux in xterm, I didn't get these characters printed to screen. So, I searched the manual for what it could be. – dpb Aug 5 '14 at 15:53
  • Thank you! This was bugging me for ... well, weeks now. :) – nem75 Apr 16 '15 at 13:27
  • This solution does not work for xfce (XUbuntu 16.04) terminal. – Wilson Freitas Apr 13 '17 at 18:08

Edit ~/.tmux.conf or with Byobu $HOME/.byobu/.tmux.conf:

set -g set-clipboard off

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.