I shift click to select text then shift-C-c to copy it to the system clipboard, but I can't do this and scroll to copy large bodies of text and can't do it using only keys either.

I'm running kali 2020.4, zsh, tmux 3.1c, and xterm-256color (in tmux it is screen). I have downloaded xclip and xsel. I killed my tmux session before I made any changes to .tmux.conf.

Some of the options I tried gave me this when I started up tmux, which I had to C-c in order to do anything:

/home/zander/.tmux.conf:17: usage: bind-key [-nr] [-T key-table] [-N note] key command [arguments]

I am able to C-b [, C-space to select text with arrows, but when I press y or enter nothing happens. C-w or alt-w works to copy it to the tmux buffer, but I want it in my system buffer/clipboard so I can paste it in other apps.

Here is my ~/.tmux.conf file, each commented out line is an attempt I made.

# enable scrollwheel
set -g mouse on

# auto scroll when shift clicking.  only partially worked.
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'

# copy to system buffer (clipboard). also didn't work.
# bind -t vi-copy y copy-pipe "xclip -sel clip -i"

# copy to system buffer...also didn't work wtf.  someone said it was because mouse scrollwheel was enabled but I tested that and that's not it.
#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"

# copy to clipboard again
# bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'

# take f***ing 4
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'

# take f***ing 5
# bind -t vi-copy Enter copy-pipe "xclip -i -selection clipboard" 

# trying with xsel now
# bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"

# trying with yank now...C-b I didn't work
# set -g @plugin 'tmux-plugins/tmux-yank'

# manually downloaded tmux-yank...pressing y to copy to system clipboard still doesn't work
# run-shell ~/clone/path/yank.tmux
  • I removed some of the noise from your question, can you edit again to make it more concise. We don't measure the worth of a question by its word count. Jan 21, 2021 at 17:31
  • Thanks for trimming off some of the fat. I was just trying to be as detailed as possible but I see now how some details were superfluous. I made it more concise.
    – zapata013
    Jan 21, 2021 at 18:36

1 Answer 1


I was able to solve this with yank. I tried this originally but I didn't have the tmux plugin manager installed.

  • 1
    Don't put 'SOLVED' in the title of your question. Accept your own answer instead. That will close the question. Jan 22, 2021 at 9:37
  • Okay got it, thanks. I figured there was a better way to say it was solved...this is my first question on here. I just clicked the checkmark by my answer but it says "you can accept your own answer in 32 minutes"?
    – zapata013
    Jan 23, 2021 at 14:16
  • 1
    What solution did you try? Simply saying I was able to solve is not enough. Put the steps that led you to the solution in your answer.
    – dryleaf
    Feb 2, 2021 at 3:17
  • As I said in my answer, I solved it with yank. I couldn't get yank to work at first because I didn't have the tmux plugin manager installed. I forget the exact steps but it was very simple and easy to find once I knew what I was looking for.
    – zapata013
    Feb 3, 2021 at 4:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .