#4 xclip does not set X11 clipboard


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

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?



  • gzarkadas

    gzarkadas - 2010-07-09

    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.

  • gzarkadas

    gzarkadas - 2010-07-11

    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.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks