Clipboard Manager (glipper&parcellite) makes copy/pasting of images between programs impossible

Bug #104432 reported by Leon van der Ree
170
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Glipper
Fix Released
Critical
Parcellite
Unknown
Unknown
glipper (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: glipper

When I have glipper on, I can't paste any images in OpenOffice.

Tekst works out okay, but when you 'cut' an image in a text document and paste it at an other location in the same document it won't show up...

Revision history for this message
HuwSy (other-huenik) wrote :

Im having the same problem, it wont copy images/graphix etc to the clipboard in any form to the clipboard unless it can copy it in a text form like as an address.

Revision history for this message
Wayne Davison (wayned) wrote :

This bug is caused by some incorrect logic when the checkClipboard() function calls the processContent() function (both in src/main.c). If the call to gtk_clipboard_wait_for_text() returned a NULL (because the clipboard item could not be changed into plain text), the NULL gets passed to processContent(), and that function resets the clipboard to the last-known text item, obliterating all non-text clipboard items as quickly as they are found.

I'll report this item upstream. In the meantime, if a quick fix is desired, the processContent() function could be changed to ignore a NULL newContent arg. That would cause Glipper to ignore all non-text items, with the only downside being that the drop-down menu would show the last-known plain-text item as being current even though no plain-text is available to paste (but that's better than the current behavior).

Changed in glipper:
status: Unconfirmed → Confirmed
Revision history for this message
Wayne Davison (wayned) wrote :

I have created a patch for glipper 0.95.1 that fixes this problem as several others that I discovered. If anyone is interested, you can grab it here:

http://opencoder.net/glipper-fixes.patch

It mentions all the fixes at the start of the patch. (I also reported this to the glipper project on sourceforge.)

Note that my "quick fix" idea suggested in the previous entry was too simple of a change to fix the problem. The patch file fixes this in a much better way.

Revision history for this message
Leon van der Ree (lvanderree) wrote :

Sweet!

I looked at your patch and saw I'm not familiar enough with linux applications nor C++ to do this myself, but it works great! Nice you added the entry "binary data" in the glipper-list.

Thanks.

For the people who don't know how to apply the patch, I did it this way (first time I applied a patch to a package):

apt-get source glipper
cd glipper-0.95.1/
patch -p0 < ../glipper-fixes.patch
./autogen.sh
./configure
make
sudo checkinstall -D

Revision history for this message
HuwSy (other-huenik) wrote :

some ppl like myself may discover they need to install (synaptics propably easier as im not sure of the proper package names, having already forgotten) libgtk2 dev, libgnome2 dev and libglib dev before building.

nice temporary fix tho, shame it wont make it into the cvs until its a bit more complete.

Revision history for this message
Wayne Davison (wayned) wrote :

For those wanting to build the package, this command will install the build-dependencies:

apt-get build-dep glipper

I added a change to the "debian/changelog" to the patch to make it easier to build a new .deb package from the source (and the patch now requires the -p1 option, not -p0). For instance:

wget http://opencoder.net/glipper-fixes.patch
apt-get source glipper
cd glipper-0.95.1
patch -p1 <../glipper-fixes.patch
dpkg-buildpackage -rfakeroot -b

sudo dpkg -i ../glipper_0.95.1-1.1_i386.deb

Revision history for this message
Timmie (timmie) wrote :

Hi,
are there any plans to release a official fixed packages for Glipper?

If one doesn't know about this but one spends a lot of time without knowing why images can't be caopied & pasted.

Thanks to the initial reporter. You saved me some time and I can now work effectively after disabeling Glipper.

Revision history for this message
Leon van der Ree (lvanderree) wrote :

You are welcome...

But why disabling Glipper? The solution posted by Wayne Davison works perfectly well, I use it since it release and never had a problem ever since...

I hope this solution gets included in a next package. Maybe it can one day even be enhanced by showing a preview of the binary data (when applicable).

Revision history for this message
Timmie (timmie) wrote :

> But why disabling Glipper? The solution posted by Wayne Davison works perfectly well, I use it since it release and never had a problem ever since...
Because I first have to finish my work for tomorrow and then maybe have time to play and fix it.

But since it is confirmed that this patch fixes it well, why doesn't the package administrator prepare a new package?

Revision history for this message
Leon van der Ree (lvanderree) wrote :

Why isn't this patch used in gutsy???

Revision history for this message
Wayne Davison (wayned) wrote :

My changes made it into the CVS version of glipper (with a couple strange omissions that I need to ask them about). But that does mean that the maintainers of glipper approve of the method used in the patch.

Revision history for this message
Leon van der Ree (lvanderree) wrote :

Ah great news! So we might expect it in Hardy than

Revision history for this message
Leon van der Ree (lvanderree) wrote :

This bug has survived in hardy!

Glipper has been rewritten in Python (instead of C) and so the bug-fix of Wayne Davison will now probably be impossible to merge.

I've already upgraded to hardy to do some testing and I can tell that Glipper 1.0 does not support copy-pasting of binary data (like images) not even from one open-office app to the other.

Maybe a plugin can be written for the current glipper, to make it able to handle binary data.

Revision history for this message
John Pham (jhnphm) wrote :

The bug should be marked up as more severe, and something should be done about it like indicating somewhere obvious that it breaks copy/paste of images. I spent several hours trying to figure out why copy and paste of images didn't work despite it being fixed in Firefox 3.

Changed in glipper:
importance: Undecided → Medium
Revision history for this message
Gustav Dahl (linkthewindwaker) wrote :

When I try to copy a graph from Calc to Writer, it won't show up. It seems that Glipper can't copy graphs, and I have to shut it down before copy and paste it.

Revision history for this message
Nizar Kerkeni (nizarus) wrote :

this bug still affecting ooo 2.4.1

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

Use Klipper. Works without problems.

Revision history for this message
Me (glich-glich) wrote :

isn't klipper just for KDE?

Revision history for this message
alecwh (alecwh) wrote :

Confirmed in Hardy (applet).

Revision history for this message
Maulwurf (w-launchpad-raimund-hofmann-de-deactivatedaccount) wrote :

same problem for me.
my "workaround": stop glipper while working with OO. :(

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

I use Klipper and it works fine with Open Office

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

klipper works fine on normal desktop computers but not in thin client set-ups. klipper loads only in teh upper right corner and stays disfunctional.

Revision history for this message
sergm (smalinovskij) wrote :

I'm on Ubuntu 8.10 and klipper does not work well here...and it never worked fine in Gnome.

Instead of klipper/glipper I'm using Parcellite - it's simple/lite and it's really nice and has all the functionality that glipper does and it does NOT have this bug.
I can copy images from browser to ooo, everythign works fine.

Revision history for this message
Doug Holton (edtechdev) wrote :

Thanks. You need parcellite 0.9 though, because otherwise the clipboard contents still disappear when you close an application. It's still at 0.7 in the repositories.
http://parcellite.sourceforge.net

To compile 0.9 you'll need at least build-tools, intltool, and libgtk2.0-dev. Then run:
./compile
make
sudo make install

like usual

Clipboard finally works like it should.

Revision history for this message
sergm (smalinovskij) wrote :

I've installed it using Synaptic In Ubuntu 8.10 and it was v. 0.9 there.

But probably it's an earlier version in earlier releases of Ubuntu.

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

On Ubuntu 8.10 32bit the present version of parcellite is 0.7-1 not 0.9

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

Find the version 0.9 for 32 bit attached or go here http://darkstar.ist.utl.pt/getdeb/ubuntu/intrepid/pa/

Revision history for this message
sergm (smalinovskij) wrote :

be4truth:

you're right, my bad, I have 0.7-1 version installed.

the most interesting part is that everything works fine for me in 0.7-1

then I tried to install 0.9 version from the link that you gave and I can't copy images from browser and paste it to Open Office anymore...
once rolled back to 0.7-1 everything is fine!!!

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

sorry, but 0.9 is not copying images from calc to writer. 0.7-1 is ok.
I have no problems with klipper and glipper.

Revision history for this message
Craig73 (funrun73) wrote :

This affects more than openoffice it impacts GIMP - which makes it annoying as I want to go straight from screenshot to GIMP (and it's absurd that this bug is still there after almost 2 years)

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

I agree with Craig. It is quite a thing that an operating system like Ubuntu in 2009 doesn't not solve the problem of a clipboard. In areas of productivity the multiple clipboard together with multiple desktops have always convinced migrated people after some time about Linux. Shall we wait until Windows 7 comes out with fancy clipboards and multiple desktops?

Look - my birthday is in March: For my birthday I wish a proper functioning glipper - anybody ready to look into it?

Enjoy!

Revision history for this message
Xavier Guillot (valeryan-24) wrote :

Hello,

I have exactly the same problem - not able to paste an image from Gimp or Open Office - but with Parcellite running instead of Glipper, it pastes the last text selection instead of image :

http://parcellite.sourceforge.net/?p=73

Revision history for this message
D!ego (diegoasanza) wrote :

This bug is still in jaunty.

Revision history for this message
be4truth (short-unique-name-in-use) wrote :

I think after all this time this bug transforms into a feature :-) . It confirms my experience that programmers don't use OpenOffice (otherwise they would fix this immediately or over the weekend). Let's hope for the best. Jaunty is not the last release ....

Revision history for this message
Wayne Davison (wayned) wrote :

Jaunty has glipper 1.0, which is based on their python rewrite of the C source. I just looked at their python code, and it has logic in it to avoid forcing a text value when there is a binary object on the clipboard (which is what my C patch did that they incorporated into the C version). However, it does not adjust the menu to reflect this, so the menu currently lies to you about what will be pasted.

I did a simple test of OOwriter: added an image to a page, copied the image, and then pasted it onto another page, and it pasted just fine.

I'm curious what your test case was where you saw a failure? One thing you cannot do is to copy a non-text item, close the program that put the item onto the clipboard, and then expect a non-text item to be pasted. When the program that has control of the current clipboard contents goes away, its contents goes away too, and glipper will then restore the most recent text contents it knows about to the clipboard (since it doesn't track binary content -- just avoids replacing it).

Revision history for this message
Craig73 (funrun73) wrote : Re: [Bug 104432] Re: Glipper makes copy/pasting of images in OpenOffice impossible

Can glipper be updated to retain a binary object in it's buffer?

Revision history for this message
Doug Holton (edtechdev) wrote : Re: Glipper makes copy/pasting of images in OpenOffice impossible

I'm running parcellite. I copied an image in firefox, and while firefox was still running, pasted in openoffice writer, and it pasted an old text string I had copied instead.

Revision history for this message
Belyaev Nikolay (werru82) wrote :

this bug still in parcelite 0.9.1 and glipper 1.0
;(

Revision history for this message
Xavier Guillot (valeryan-24) wrote :

Problem solved in last version of Parcellite for those interested:

http://parcellite.sourceforge.net/?p=85

Revision history for this message
pinzia (pinzia) wrote :
pinzia (pinzia)
summary: - Glipper makes copy/pasting of images in OpenOffice impossible
+ Clipboard Manager (glipper&parcellite) makes copy/pasting of images
+ between programs impossible
Revision history for this message
pinzia (pinzia) wrote :

It's Fixed for Parcellite

Revision history for this message
pinzia (pinzia) wrote :
Revision history for this message
Damien Cassou (cassou) wrote :

I confirm it's fixed with Parcellite 0.9.2.

Revision history for this message
joehill (joseph-hill) wrote :

This is still a problem in Lucid. I think it's a major problem.

It should either be fixed so that openoffice.org doesn't become completely useless (sorry, but an office application that doesn't allow cutting and pasting is useless), or there should be a warning whenever you try to add glipper to your desktop, saying "WARNING: YOU WILL NO LONGER BE ABLE TO CUT AND PASTE ANYTHING BUT TEXT. ARE YOU SURE YOU WANT TO PROCEED?" Sorry for the annoying all-caps, but this is a really annoying bug. Needless to say, I removed glipper from my desktop as soon as I realized what it was doing.

Revision history for this message
Andrew (andrew-rw-robinson) wrote : Re: [Bug 104432] Re: Clipboard Manager (glipper&parcellite) makes copy/pasting of images between programs impossible

Note that it seems to be working just fine in Lucid using Parcellite
0.9.2. I would recommend it over glipper.

Revision history for this message
udude (igal) wrote :

Using Parcellite on Lucid, I just copied text+images from Firefox from two different places.
Next I select one of those from Parcellite history and paste into OpenOffice Word.
The copied text appears but the images are missing from the pasted section. Is that intentional?
I mean, is Parcellite designed to keep the images (or link to those) in history?
That would be expected as this is the main use-case for other clipboard apps e.g. ms-clipboard

Revision history for this message
Xavier Guillot (valeryan-24) wrote :

Parcellite isn't updated anymore, but this works with the new clipboard manager program, Pastie :

https://launchpad.net/~hel-sheep/+archive/pastie

Laszlo Pandy (laszlok)
Changed in glipper:
importance: Unknown → Critical
milestone: none → 2.0
status: Unknown → Fix Released
Laszlo Pandy (laszlok)
Changed in glipper (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
udude (igal) wrote :

I realize this bug is marked as fixed/released, but it doesn't look like it from where I'm standing (natty 32bit, classic-gnome WM).

Pasting images from clipboard managers history still fails.

I tried the following managers:

$ dpkg -l | grep -i clipboard
ii glipper 2.1-0ubuntu1 Clipboard manager for GNOME
ii glippy 0.2.2.1-natty1 Simple clipboard manager for GNOME.
ii pastie 0.6.7.5~ppam1 A simple clipboard manager with appindicator support

The sequence is:
1. select text + images from web page (browser=firefox)
2. copy
3. select history entry in (whichever) clipboard manager
4. paste into open-office (libreoffice) writer

After paste, only unformatted text appears. All the formatting (tables, links, images etc) is missing.

If I skip (3) all the html contents appears fully.

Looking at this bug and thinking rationally about the purpose of a clipboard manager, makes one arrive to one conclusion: discarding the formatting, images and links while pasting from history must be unintended. Yet this has been a problem with my ubuntu systems for years. There must be something very simple I am missing. A silly checkbox option which enables/disables this functionality? dpkg-reconfigue of some component?

The functionality exists in ms-windows/office for years, it just does not make any sense it's still missing...

Revision history for this message
Laszlo Pandy (laszlok) wrote :

@udude:

Yes this is a valid concern, but it is a different bug. This bug is specifically about copying and pasting images between programs without selecting a history entry. It is because Glipper in the past would overwrite the current clipboard even if you didn't select a history entry, making, as the title says "copy/pasting of images between programs impossible".

Previously I thought I shouldn't worry about supporting images, because we can't display them in the history list anyway. But you point out that there can be formatted text and images together. In that case we can show only the unformatted text in the history menu, but paste everything when it is pasted. Copying only images we would probably still ignore because we cannot display them.

Please file a separate bug in Glipper and I will try to fix it soon. But please note it is different from this bug which is Fix Released.

Revision history for this message
udude (igal) wrote :

I've opened a new issue with the described problem here: https://bugs.launchpad.net/ubuntu/+source/glipper/+bug/785333

Yeah the images thing is tricky, but maybe links to images are not (isn't that all html after all?), well we can discuss it on the new bug

Excellent, thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.