PGN files detected as text/plain not application/x-chess-pgn

Bug #60095 reported by Robert Ancell on 2006-09-12
2
Affects Status Importance Assigned to Milestone
shared-mime-info
Fix Released
Medium
shared-mime-info (Ubuntu)
Wishlist
Ubuntu Desktop Bugs

Bug Description

Nautilus does not correctly identify PGN (portable game notation) files.

To reproduce save the following as foo.pgn:
<snip>
[Event "Local chess game"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "*"]

1. e4 d5 2. exd5 Na6 3. Bb5+ *
</snip>

Browsing with Nautilus will display a thumbnail of the text of the file and right-clicking to get the file properties will show the MIME type as text/plain.

However /usr/share/mime/packages/freedesktop.org.xml has an entry for .pgn files:
<snip>
  <mime-type type="application/x-chess-pgn">
    <comment>PGN chess game</comment>
    <glob pattern="*.pgn"/>
  </mime-type>
</snip>

If you edit this file and add <sub-class-of type="text/plain"/> after running update-mime-database then nautilus identifies correctly.

Now, I am unsure if this is a bug in shared-mime-info or nautilus or both. PGN is a sub-type of text/plain, however there is nothing ambiguous about the .pgn glob matching.

I am using Ubuntu Dapper (nautilus 2.14.3-0ubuntu1, shared-mime-info 0.17-0ubuntu11)

That bug has been described on
https://launchpad.net/distros/ubuntu/+source/shared-mime-info/+bug/60095

"Nautilus does not correctly identify PGN (portable game notation) files.

To reproduce save the following as foo.pgn:
<snip>
[Event "Local chess game"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "*"]

1. e4 d5 2. exd5 Na6 3. Bb5+ *
</snip>

Browsing with Nautilus will display a thumbnail of the text of the file and
right-clicking to get the file properties will show the MIME type as text/plain.

However /usr/share/mime/packages/freedesktop.org.xml has an entry for .pgn files:
<snip>
  <mime-type type="application/x-chess-pgn">
    <comment>PGN chess game</comment>
    <glob pattern="*.pgn"/>
  </mime-type>
</snip>

If you edit this file and add <sub-class-of type="text/plain"/> after running
update-mime-database then nautilus identifies correctly.

Now, I am unsure if this is a bug in shared-mime-info or nautilus or both. PGN
is a sub-type of text/plain, however there is nothing ambiguous about the .pgn
glob matching.

I am using Ubuntu Dapper (nautilus 2.14.3-0ubuntu1, shared-mime-info
0.17-0ubuntu11)"

Sebastien Bacher (seb128) wrote :

Thanks for your bug. I've forwarded it upstream: https://bugs.freedesktop.org/show_bug.cgi?id=8286

Changed in shared-mime-info:
assignee: nobody → desktop-bugs
importance: Untriaged → Wishlist
status: Unconfirmed → Confirmed
Changed in shared-mime-info:
status: Unknown → Confirmed

Additionally I wonder if the description shouldn't be changed to something like
"PGN chess games" or "PGN chess game notations", since PGN files usually include
a collection of games.

Sebastien Bacher (seb128) wrote :

This upload fixes the issue:

 shared-mime-info (0.19-1ubuntu1) unstable; urgency=low
 .
   * New upstream version, UVF exception granted by Matt Zimmerman:
     * Mime-type Changes:
       - Add application/powerpoint and application/mspowerpoint as aliases for
         Powerpoint
       - Add VHDL mime-type
       - Add application/mbox for the MBOX mailboxes
       - Add text/x-txt2tags
       - Remove *.dat as a glob for MPEG videos
       - Add Monkey's Audio, AC3, and Musepack mime-types (Ubuntu: #34456)
       - Fix matching Type1 fonts
       - Remove useless application/octet-stream mime-type
       - Add *.mo to application/x-gettext-translation
       - Add loads of tracker audio files, console ROMs, raw images mime-types
       - Fix QuickTime Media Links mime-types and detection
       - Add audio/AMR and audio/AMR-WB mime-types and detection
       - Add better TeX magic, and more globs
       - Add better magic for patch files
       - Fix .jar files' mime-types, and add better magic
       - Fix magic for MPEG4 audio files
       - Add an alias for .deb packages
       - Add application/sieve mime-type
       - Fix application/javascript's mime-type
       - Fix text/csv's mime-type
     * Other:
       - Add paths to the .pc file
   * Sync with Debian, changes from Ubuntu:
   * debian/control.in:
     - Build-Depends on intltool to build the translations template for rosetta
   * debian/patches/060_pdf_priority.patch:
     - fixed with the new version
   * debian/patches/080_pgn_text_type.patch:
     - make application/x-chess-pgn a sub-class of text/plain (Ubuntu: #60095)
   * debian/patches/110_no_directory_alias_fix_open_with.patch:
     - don't set an alias from "inode/directory" to "x-directory/normal",
       fix nautilus "open with" associations when selecting a directory
       (Ubuntu: #35463)
   * debian/patches/200_wavpack-mimetype.patch:
     - list "audio/x-wavpack" mimetype

Changed in shared-mime-info:
status: Confirmed → Fix Released

2007-02-05 Bastien Nocera <email address hidden>

        * freedesktop.org.xml.in: Add magic for the PGN mime-type,
        make it a text/plain sub-class, change the human-readable name
        to "PGN chess game notation" (Closes: #8286)

Changed in shared-mime-info:
status: Confirmed → Fix Released
Changed in shared-mime-info:
importance: Unknown → Medium
Changed in shared-mime-info:
importance: Medium → Unknown
Changed in shared-mime-info:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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