astrand / xclip

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

xclip does not set X11 clipboard #15

Closed astrand closed 4 years ago

astrand commented 14 years ago

This works and prints 'hello': $ echo hello | xclip $ xclip -o hello

Pasting in a graphical application doesn't work. Here I get the old content, before 'hello' was copied the way shown above. But it works the other way around. A text copied from a website can be printed out on a console properly using 'xclip' command.

Can anyone confirm this?

Thanks, Andreas

Reported by: *anonymous

Original Ticket: xclip/bugs/4

astrand commented 14 years ago

The 0.08 version as shipped by Ubuntu is confirmed to not cooperate with gnome apps' clipboard in Ubuntu 9.10 Karmic Koala.

Symptoms: when text is piped to (ver 0.08) xclip -selection "clipboard", it does not appear as "Paste" command (the menu is dimmed) in gui apps such as gedit, firefox and a clipboard screenlet I have installed. It can be pasted though with Ctrl+V in gedit and firefox, but not in a gnome-terminal with Ctrl+Shift+V. It appears with xclip -o.

The 0.12 version (downloaded and built from source tarball) is confirmed to cooperate; piping text to (ver 0.12) xclip -selection "clipboard" appears as "Paste" command and can be pasted everywhere.

The same version though (0.12) is reported to not work with Ubuntu 10.04 Lucid Lynx at this thread: http://ubuntuforums.org/showthread.php?t=1522635 , posts #11 and #14. From the thread it is unclear whether the -selection "clipboard" options was used; I have invited the other participant to comment here as well.

Original comment by: gzarkadas

astrand commented 14 years ago

I confirm that version 0.12 woks also for Ubuntu 10.04 Lucid Lynx. The report on the thread mentioned in my previous comment ommited to specify ` -selection "clipboard" ' in xclip's command line; putting this option resolved the issue.

Original comment by: gzarkadas

hackerb9 commented 4 years ago

I'm closing this bug as '-selection clipboard' seems like the solution. Note that once pull request #88 is merged users can simply use "-c".