[vim/vim] Clipboard and primary selection registers not working despite +clipboard (Issue #15111)

39 views
Skip to first unread message

Enrico Maria De Angelis

unread,
Jun 26, 2024, 8:45:15 AMJun 26
to vim/vim, Subscribed

Steps to reproduce

  1. The version of Vim reported below is installed on a Debian 12 system
  2. I connect to it via ssh -Y user@host (same behavior for ssh -X user@host)
  3. yanking in + or * registers is not effective, nor putting in them; indeed, after I attempted yaking in them, they're still not listed in :registers.

Expected behaviour

If I run xterm-256color in a GUI session on the host, + and * work. Indeed, when I'm in the office they do work.

And if I connect via SSH from a xterm-256color on my computer, + and * don't work.

So I think the problem is unrelated to the terminal emulator, but to SSH. Indeed, I would have expected the observed behavior if I had not passed -X nor -Y.

Version of Vim

9.0 (2022 Jun 28, compiled May 04 2023 10:24:44) Included patches: 1-1378, 1499

Environment

  • Operating system: Debian 12
  • Terminal: what is this?
  • Value of $TERM: rxvt-unicode-256color, but I've tried with xterm-256color, and obeserve the same behavior
  • Shell: bash

IMPORTANT I'm connecting to the machine via SSH, so the value of $TERM is the one on my system (Arch), not on Debian 12.

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111@github.com>

Quan Nguyen

unread,
Jun 26, 2024, 8:07:06 PMJun 26
to vim/vim, Subscribed

Does this answer your question?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2192818080@github.com>

Enrico Maria De Angelis

unread,
Jun 27, 2024, 1:38:55 AMJun 27
to vim/vim, Subscribed

@nv-quan , I think it doesn't

  • I'm not on a Mac
  • I know I don't need any mouse-settings different that what I already have, considering that the clipboard does work on a Debian 11 I still have access to (I'll copy more detail from the stackexchange question to here, sorry)
  • I am already using ssh -X as suggested by the last bullet point in the accepted answer.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2193794505@github.com>

Quan Nguyen

unread,
Jun 27, 2024, 8:04:58 AMJun 27
to vim/vim, Subscribed

Then could it be a X-forwarding issue? Did you try copying to clipboard using another app through the ssh x-forwarding?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2194507671@github.com>

Enrico Maria De Angelis

unread,
Jun 27, 2024, 5:06:28 PMJun 27
to vim/vim, Subscribed

Would you suggest a way to use the clipboard via SSH that doesn't involve Vim?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2195665295@github.com>

Quan Nguyen

unread,
Jun 27, 2024, 6:14:51 PMJun 27
to vim/vim, Subscribed

Maybe you can try xclip


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2195754755@github.com>

Enrico Maria De Angelis

unread,
Jun 28, 2024, 3:59:16 PMJun 28
to vim/vim, Subscribed

I worked from the office today, so I could try this:

  1. open a terminal emulator
  2. select some text with the mouse
  3. execute xclip -o
  4. SSH to oneself (with -X)
  5. execute xclip -o

At step 3, the selected text is correcly echoed.

At step 5, I get

Error: Can't open display: (null)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2197545483@github.com>

Enrico Maria De Angelis

unread,
Jul 1, 2024, 2:41:53 AMJul 1
to vim/vim, Subscribed

Ok, nevermind, it turns out IT department had disabled X11 forwarding :|

The solution was to add a whatever.conf file under /etc/ssh/sshd_config.d/ with content

X11Forwarding yes

which has clearly nothing to do with Vim.

I suppose this thread can be closed, ... unless Vim could have a way to test for such a lack of x11 forwarding and throw a warning/error?

If not, I guess we can truly close this.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15111/2199357428@github.com>

Christian Brabandt

unread,
Jul 3, 2024, 12:13:31 PMJul 3
to vim/vim, Subscribed

Closed #15111 as not planned.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/15111/issue_event/13383155836@github.com>

Reply all
Reply to author
Forward
0 new messages