abiword (and other text editing apps) should not appear in the Open With menu for PDFs

Bug #44523 reported by Sitsofe Wheeler
10
Affects Status Importance Assigned to Milestone
abiword (Ubuntu)
Invalid
Medium
Unassigned
shared-mime-info (Ubuntu)
Fix Released
Medium
Sebastien Bacher

Bug Description

Description of the problem:
On my dapper install pressing the right mouse button over a PDF shows Open with "Abiword Word Processor" in the Open With menu.
Steps to reproduce:
1. Install abiword .
2. Press the right mouse button over a PDF in nautilus.
3. Choose Open with "Abiword Word Processor"

Expected results:
Abiword not to appear the menu for PDFs

Actual results:
"Abiword Word Processor", "Gvim Text Editor" and "Text Editor" all appear in the Open With menu for PDFs.

Version:
abiword 2.4.4-0ubuntu5
shared-mime-info 0.17-0ubuntu9

Revision history for this message
Hubert Figuiere (hub) wrote :

looks like a bug.

Do you have the abiword-plugins installed?

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Oops, almost overlooked this.

Hubert:
No I don't have abiword-plugins installed.

Revision history for this message
Hubert Figuiere (hub) wrote :

then AbiWord try to open the PDF as text file which is bad. But why is PDF assigned to AbiWord?

install abiword-plugins as a work around.

Revision history for this message
Adam Petaccia (mighmos) wrote :

I can confirm this bug, and abiword-plugins renders PDFs _horribly_ (at least on AMD64).

Adam Petaccia (mighmos)
Changed in abiword:
status: Unconfirmed → Confirmed
Revision history for this message
Hubert Figuiere (hub) wrote :

Don't expect miracles for PDF import.

Revision history for this message
Adam Petaccia (mighmos) wrote :

Perhaps this "feature" should be disabled until it works correctly, then. Because right now, its abysmal.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

> But why is PDF assigned to AbiWord?

This is strange. I poked about in /usr/share/applications and the abiword.desktop doesn't list pdf. Looking at Open With again also shows gvim and gedit in the list of programs PDFs can be opened with too.

There is something that all three share in common: in
/usr/share/application-registry
They all have mime_types=text/* . Are PDFs counted as being a subtype of text?

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

And lo, after plenty of searching I have turned up
  <mime-type type="application/postscript">
    <sub-class-of type="text/plain"/>
inside
/usr/share/mime/packages/freedesktop.org.xml

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Hmm after perusing that file some more I found postscript and pdf appear to be misclassified.

I think you can just about make the case for RTF being a subtype of text/plain given that you read it when you strip away the markup in a text viewer like vi. However binary formats like application/pdf and application/postscript are no more readable in a text viewer than a binary MSWord 6 document (and Word documents aren't a subtype of text/plain).

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

With that part tracked down I guess we are left with whether abiword should cope better with binary files being parsed as text... Since it can't actually display a binary file that contains text perhaps it would be better if it popped up a warning when such files were opened?

OpenOffice Writer actually pops up a "parse as" list when given a document it can't identify and setting the parse format to text resulted in the document being loaded in 5 seconds (of course it looked a mess and had lots of black diamonds in it). The same document doesn't finish loading in abiword after 5 minutes...

Revision history for this message
Hubert Figuiere (hub) wrote :

I think there is a bug upstream for that. If not, please file one.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

re: sucks CPU when opening unknown file format

It looks a lot like http://bugzilla.abisource.com/show_bug.cgi?id=10187 (I'm rather pleased this part had already been reported because I'm loathe to create new bug tracking system accounts - I'm on enough of them already...). I'll retitle and reword this launchpad bug to cover only the mimetype issue.

description: updated
Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Hubert:

Do you want to reject this bug against the abiword product?

Revision history for this message
Hubert Figuiere (hub) wrote :

There is definitely a bug in upstream.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

> There is definitely a bug in upstream

For what? The freedesktop "incorrect PDF subclass" problem or the abiword "CPU eating on unknown file" issue?

Revision history for this message
Hubert Figuiere (hub) wrote :

#2. The bug as originally supported.

Revision history for this message
Sebastien Bacher (seb128) wrote :

pdf is not a subclass of text, that change has been backported wrongly from the CVS with a patch, will be fixed with next upload

Changed in shared-mime-info:
assignee: nobody → seb128
status: Unconfirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

fixed for dapper:

 shared-mime-info (0.17-0ubuntu11) dapper; urgency=low
 .
   * debian/patches/170_mime_subclassing.patch:
     - pdf is not a subclass of text (Ubuntu: #44523)

Changed in shared-mime-info:
status: Fix Committed → Fix Released
Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

I now longer see the originally described bug (abiword and other text apps appear in open with menu for PDFs) under Gutsy. Should the abiword component simply be marked invalid?

Revision history for this message
Sebastien Bacher (seb128) wrote :

closing the task then, feel free to reopen if you get the issue again though

Changed in abiword:
status: Confirmed → Invalid
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.