You are not logged in.
Hi,
I've very strange and very annoying problem which I think is easy to solve but after a two hours of playing around with tmux, searching web and reading manuals I decided to ask for help. So I want to configure tmux to work with the x clipboard so I've pasted two config lines from arch wiki which should let me copy tmux clipboard to x clipboand by C-b C-y and pasting x clipboard to tmux clippboard by C-b C-p but nothing of this bindings work. What is more any of my two other test bindings doesn't work too but other two bindings which I found somewhere in the internet works. What am I doing wrong?
This is my .tmux.conf file:
set-window-option -g mode-keys vi # works
bind-key -t vi-copy 'v' begin-selection # works
bind-key -t vi-copy 'y' copy-selection # works
bind-key C-h run "touch /tmp/test11" # doesn't work
bind-key C-i display-message "Foo" # doesn't work
bind-key C-y run-shell "tmux show-buffer | xclip -i -selection clipboard" # doesn't work
bind-key C-p run-shell "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" # doesn't work
Offline
So are you looking for "Copy & Paste" between Tmux and X? If so throw away Urxvt (if you are using it obviously), which I read that don't work right for such thing, pick up a new terminal emulator (I use XTerm) and put in your ,tmux.conf the following.
# Save into System Clipboard (+). With preselection.
bind "C-c" choose-buffer "run \"tmux save-buffer -b %% - \
| xclip -i -sel clipboard\" \; run \" tmux display \\\"Clipboard \(+\) \
filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer \
count=80 2> /dev/null)... \\\" \" "
# Copy from + Clipboard.
bind "C-v" run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; \
tmux paste-buffer" \; run "tmux display \"Copied from \(+\) $(xclip -o -sel \
clipboard | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \""
# Save into Selection Clipboard (*). With preselection.
bind "C-d" choose-buffer "run \"tmux save-buffer -b %% - | xclip -i\" \; \
run \" tmux display \\\"Clipboard \(*\) filled with: $(tmux save-buffer -b \
%1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" "
# Copy from * Clipboard.
bind "C-f" run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer" \; run \
"tmux display \"Copied from \(*\) $(xclip -o | dd ibs=1 obs=1 status=noxfer \
count=80 2> /dev/null)... \""More than essential but the only one (I found) which works.
Offline