Bug #10889

shared-mime-info associates .key files with LibreOffice Writer in GNOME Files

Added by anonym 2016-01-09 22:03:57 . Updated 2016-01-27 13:33:42 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2016-01-09
Due date:
% Done:

100%

Feature Branch:
bugfix/10889-dot-key-file-association
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

We should perhaps try a more recent shared-mime-info.


Subtasks


Related issues

Related to Tails - Bug #10571: The 'application/pgp-keys' MIME type has bad application associations Resolved 2015-11-17
Related to Tails - Bug #15213: Tails signing key can't be imported from Seahorse with the default key files filter Resolved 2018-01-22

History

#1 Updated by intrigeri 2016-01-10 15:36:26

  • related to Bug #10571: The 'application/pgp-keys' MIME type has bad application associations added

#2 Updated by intrigeri 2016-01-10 16:19:20

  • Subject changed from GNOME Files associates .key files with LibreOffice Writer to shared-mime-info associates .key files with LibreOffice Writer in GNOME Files
  • Status changed from New to In Progress
  • % Done changed from 0 to 10

I’ll try to fix that in 2.0, but note that Tails 1.8.1 has exactly the same problem.

So, Bug #10571 is back. Apparently application/pgp-keys is correctly associated, but *.key are now seen as Apple Keynote files by the MIME machinery (shared-mime-info). On sid, if I rename such a file to .asc, then it’s open with “Import a key”, as desired. Upgrading to shared-mime-info 1.5-2~bpo8+1 has no effect.

Adding application/x-iwork-keynote-sffkey=seahorse-pgp-keys.desktop to /etc/gnome/defaults.list and killing nautilus fixes the problem in a live Tails/Jessie. In the context of Tails, I guess we should rank keynote presentations lower compared to OpenPGP keys, so I’ll just do that.

The nicer way to get what we want would be to teach shared-mime-info to give less weight to the *.key glob, compared to actual file content. I’ll report a bug against shared-mime-info upstream. I’ve tried to do naively, and failed:

--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -6499,7 +6499,7 @@ command to generate the output files.
         <match type="string" value="index.apxl" offset="30"/>
       </match>
     </magic>
-    <glob pattern="*.key"/>
+    <glob weight="10" pattern="*.key"/>
     <alias type="application/vnd.apple.keynote"/>
   </mime-type>

#4 Updated by intrigeri 2016-01-10 19:23:13

  • Assignee changed from intrigeri to anonym
  • % Done changed from 10 to 50
  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/10889-dot-key-file-association

#5 Updated by anonym 2016-01-11 11:43:43

  • Status changed from In Progress to Fix committed
  • % Done changed from 50 to 100

Applied in changeset commit:d2a253b3c49d68364ce8c521cf03d3a5f59f6216.

#6 Updated by anonym 2016-01-11 11:49:34

  • Assignee deleted (anonym)
  • QA Check changed from Ready for QA to Pass

#7 Updated by anonym 2016-01-27 13:33:42

  • Status changed from Fix committed to Resolved

#8 Updated by intrigeri 2018-02-08 07:47:12

  • related to Bug #15213: Tails signing key can't be imported from Seahorse with the default key files filter added