4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tmux で xclip を実行したら Perfix キーがきかなくなった

Posted at

tmux でバッファの内容を X のクリップボードにしようと以下の設定をしました。

.tmux.conf
bind-key C-c run "tmux save-buffer - | xclip

これで Prefix キー + C-c を打鍵するとコピーできるのですが、
一度でも実行するとそれ以降 tmux に Prefix キーが送れなくなりました。

いろいろと調べた結果、xclop に -loops オプションを指定すると解消しました。
-loops は X セレクションへのリクエスト回数を制限するオプションのようで、
1 だと値が小さ過ぎるのかコピーできず、3 で正常にコピーできしました。

.tmux.conf
bind-key C-c run "tmux save-buffer - | xclip -loops 3 

もしかすると環境依存の現象かもしれませんが
同様のことで困っている方がいたら試してみて下さい。

私の環境:

  • Ubuntu 13.10
  • tmxu 1.8-4
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?