astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.04k stars 75 forks source link

Unable to empty clipboard on Ubuntu 19.10 #81

Closed miskovics closed 3 years ago

miskovics commented 4 years ago

I understood by reading in several articles on the Internet, that the second and third lines would clear the clipboard, but for me, on my Ubuntu 19.10 machine they don't.

$ echo "TEST" | xclip -i -selection clipboard && xclip -o -selection clipboard
TEST
$ echo -n "" | xclip -i -selection clipboard && xclip -o -selection clipboard
TEST
$ echo -n | xclip -i -selection clipboard && xclip -o -selection clipboard
TEST
$ 
hackerb9 commented 3 years ago

Weird. I pasted what you typed in and it worked for me. What version of xclip are you using?

miskovics commented 3 years ago

This is the current version I use, with the same phenomena.

$ xclip -version
xclip version 0.13
Copyright (C) 2001-2008 Kim Saunders et al.
Distributed under the terms of the GNU GPL
$

Nevertheless, following a sudden inspiration, I terminated Autokey, retested the use case and xclip works as expected.

$ echo "TEST" | xclip -i -selection clipboard && xclip -o -selection clipboard
TEST
$ echo -n | xclip -i -selection clipboard && xclip -o -selection clipboard
$ 

So it seems there is no issue with xclip, but Autokey somehow prevents xclip to do its work; closing the issue here.

hackerb9 commented 3 years ago

Thanks for figuring out the mystery! Do you believe it is an issue in autokey itself, not your particular configuration? If so, it may be helpful to that project if you report a bug with them.

miskovics commented 3 years ago

It was my config.