Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux yank no longer working #172

Closed
jamesla opened this issue Aug 7, 2023 · 15 comments
Closed

tmux yank no longer working #172

jamesla opened this issue Aug 7, 2023 · 15 comments

Comments

@jamesla
Copy link

jamesla commented Aug 7, 2023

Have recently updated system and everything else clipboard is working fine however the tmux yank is no longer copying.

Not actually even sure how to troubleshoot as it just fails silently and I can't find an error message in logs etc.

What is the best way to troubleshoot tmux yank?

@anakimluke
Copy link

What OS version are you on? And is tmux-yank updated? (prefix-u to update it if you are using TPM)

@jamesla
Copy link
Author

jamesla commented Aug 8, 2023

I'm on nixos and I'm using the tmux-yank nix package (which follows the manual installation method).

Is there anyway to show what plugins are loaded when done manually?

@DANic-git
Copy link

The same on me on WSL Ubuntu 22.04
Issue after update to VScode 1.82.0
May related with Disable bracketed paste mode

@anakimluke
Copy link

anakimluke commented Sep 14, 2023

The nix package seems to be either old or misconfigured. I tested on nixos with the packages tmux and tmuxPlugins.yank and couldn't get it to work. Using only the nix package tmux and installing tmux-yank following the manual installation instructions on this repo I get normal behavior.

@jamesla maybe move this issue to nixpkgs?

@DANic-git are you using nix as well?

@DANic-git
Copy link

I use VScode integrated terminal with WSL Ubuntu issue related with microsoft/vscode#192518

@jamesla
Copy link
Author

jamesla commented Sep 15, 2023

The nix package seems to be either old or misconfigured. I tested on nixos with the packages tmux and tmuxPlugins.yank and couldn't get it to work. Using only the nix package tmux and installing tmux-yank following the manual installation instructions on this repo I get normal behavior.

@jamesla maybe move this issue to nixpkgs?

@DANic-git are you using nix as well?

I've just overridden that outdated nix package to use the latest version of tmux yank acfd36e4fcba99f8310a7dfb432111c242fe7392 which is the latest commit on master however still not working.

Is there any way from within tmux to see what version of yank is being installed?

@anakimluke
Copy link

Is there any way from within tmux to see what version of yank is being installed?

Hmm I don't think so. Unless using tpm, installing a package simply means running a bash script.

Can you roll back to the last version you had it working? I don't know much about nix so I can't help here.

@jamesla
Copy link
Author

jamesla commented Sep 17, 2023

Unfortunately I can't roll back so only option is to fix this.

are there any debug style commands that I can use to try and provoke the yank plugin into giving me an error message or something?

@lh0n
Copy link

lh0n commented Oct 3, 2023

In my case, yanking stopped working only over an SSH/Mosh session. Locally, it works.

Remote host

  • Both xsel and xclip installed.
  • ~/.tmux.conf relevant contents
set -as terminal-features ',*:clipboard'

[..]

set -g @plugin 'tmux-plugins/tmux-yank'
[..]
  • Additional Info
$ tmux -V
tmux 3.3a
$ tmux show -s set-clipboard
set-clipboard external
$ tmux show -s copy-command
copy-command ''
$ tmux info | grep 'Ms:'
 192: Ms: (string) \033]52;%p1%s;%p2%s\a

Anything else I could provide to aid in debugging?

@anakimluke
Copy link

anakimluke commented Oct 3, 2023

@lh0n It is expected for tmux-yank not to work if used inside an ssh session. By default the remote system doesn't have access to your local system's clipboard. Try starting tmux first, then connecting to the ssh session :)

@lh0n
Copy link

lh0n commented Oct 4, 2023

@anakimluke It works just fine! That's what this line is for in the config.

set -as terminal-features ',*:clipboard'

@anakimluke
Copy link

@lh0n What I meant is that your problem is different than the one discussed in this issue. You can create a feature request if you want :) Though I think it'd be more productive for you to google ways of sharing the clipboard between the local host and the host connected via ssh. Probably using X forwarding should work for you, if you trust the remote machine(because of the security concerns that X forwarding can bring). There seems to be other alternatives too; here some results from a brief google search: wincent/clipper, haya14busa/vim-poweryank and fcpg/vim-osc52. I haven't used those tools so I can't help with the specifics ;)

@jrusz
Copy link

jrusz commented Nov 27, 2023

I've had a similar issue where after updating the system the tmux-yank stopped working for me. I finally got so annoyed that I decided to fix it and after some googling and trial and error I managed to fix it by adding these to my .tmux.conf

set -g set-clipboard on

set -g @override_copy_command 'xclip -i -selection clipboard'

set -g @yank_selection 'clipboard'

set -as terminal-features ',*:clipboard'

Not sure if all of them are necessary but I don't want to touch it anymore, it works now. Hope it helps someone.

@trb143
Copy link

trb143 commented Jan 21, 2024

I have been having the same issue with Fedora 39 and Kali both running KDE.
My terminal was konsole and tmux-yank to clipboard did not work.
Moving to KITTY has resolved this with no change to the config. I have tested under wayland and.

@T4puSD
Copy link

T4puSD commented May 20, 2024

I am also facing this issue recently in my Arch Linux. I use alacritty as my main terminal. I even tried with kitty as suggested by @trb143 but faced same issue. I was able to fix it temporary by applying fix provided by @jrusz .

@jamesla jamesla closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants