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

clipboard: error invoking xclip: Error: Can't open display: 172.19.176.1:0 #18

Closed
horseinthesky opened this issue Mar 30, 2021 · 6 comments
Assignees

Comments

@horseinthesky
Copy link

After pressing the "" key I have about 1 minute of nothing happening. Then I get a message

clipboard: error invoking xclip: Error: Can't open display: 172.19.176.1:0

and peekup window is open.

@gennaro-tedesco
Copy link
Owner

gennaro-tedesco commented Mar 30, 2021

The error is presumably due to xclip: are you by any chance redirecting the vim registers or vim yanks to xclip?

In order to identify the problem I would suggest to:

  • show the output of :echo getreg("*") (which is the unnamed register)
  • show the output of set clipboard?
  • yank some text and then try to execute "": do you still see the error?

Moreover does the output of the command :registers show fine?

What system are you on and does it happen also if you deactivate xclip altogether?

@gennaro-tedesco gennaro-tedesco self-assigned this Mar 30, 2021
@horseinthesky
Copy link
Author

@gennaro-tedesco
:echo getreg("*") gives me fed8bd897e410cc34b2734e142882028
clipboard is clipboard=
yanking text doesn't change abything.
:registers also have this lag and also show me error message.

I'm on Ubuntu 20.04 WSL, don't use xclip explicitly but I have $DISPLAY env variable.
If I unset it everything works fine.

@gennaro-tedesco
Copy link
Owner

:registers also have this lag and also show me error message.

this means that the error is not generated by the plugin, rather by vim loading the registers content. Looking around I have found this and this, which may shed some light on why $DISPLAY generates such error.

What happens if you set clipboard+=unnamed in your vim configurations?

@horseinthesky
Copy link
Author

With set clipboard+=unnamed the issue is still there.

Actually, I can just get rid of $DISPLAY since I don't use it right now.
Just want to understand what is going on.
Please correct me:

  1. :h clipboard says NVIM is using xclip if there is $DISPLAY env variable.
  2. xclip is supposed to be connected to some x11 server.
  3. If there is no x11 server that ~1 min interval is some sort of timeout interval for this connection?

@gennaro-tedesco
Copy link
Owner

I believe what you are saying is correct however I am not an expert on this, so don't take my word for granted. Ideally one could test if any other process involving xclip --> x11 works correctly without lag, but I wouldn't really know what to look into, in that direction.

@horseinthesky
Copy link
Author

Ok. Thank you.

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

2 participants