Well, we did not bother to define an icon for the FEN mime type, so that you see that as a text file is normal. PGN, however, should have an icon associated with it:
In the Makefile the "make install" section should contain a set of commands to define mime types, register icons, and associate the mime typtes with icons and desktop files:
- Code: Select all
### install mime-type files and corresponding icons and menu entries if enabled during configure
install-data-hook: install-mime-database
uninstall-hook: uninstall-mime-database
install-mime-database:
if ENABLE_UPDATE_MIMEDB
-if test -z "$(DESTDIR)" -a -n "$(XDG_MIME)" -a -n "$(XDG_DESKTOP_MENU)" -a -n "$(XDG_ICON_RESOURCE)" ; then \
$(XDG_MIME) install --mode system --novendor xboard.xml ;\
$(XDG_DESKTOP_MENU) install --mode system --novendor xboard-pgn-viewer.desktop;\
$(XDG_DESKTOP_MENU) install --mode system --novendor xboard-fen-viewer.desktop;\
$(XDG_DESKTOP_MENU) install --mode system --novendor xboard-tourney.desktop;\
$(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/board32.xpm application-x-chess-pgn;\
$(XDG_ICON_RESOURCE) install --context mimetypes --size 32 pixmaps/cross32.xpm application-x-xboard-trn;\
$(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/board48.xpm application-x-chess-pgn;\
$(XDG_ICON_RESOURCE) install --context mimetypes --size 48 pixmaps/cross48.xpm application-x-xboard-trn;\
fi
endif
The XDG macros should translate to the relevant commands on your distribution, if they exist. E.g. $(XDG_MIME) for me becomes the xdg-mime command on Ubuntu, which reads the xboard.xml file that defines the mime types, and logs them with the system.
Unfortunately I am not really a Linux user, so I don't know off-hand how you could look what mime type the system thinks a certain file is. One presumes there is some menu where you could click 'Properties', and find it there. PGN files should have mime type x-chess-pgn. Perhaps you could try that on the PGN file, to see if the problem is that it is mis-qualified, or that you somehow have a wrong icon associated with it. The PGN type is recognized by the extension .pgn, or by starting with an Event tag, as defined in the xboard.xl file:
- Code: Select all
<mime-type type="application/x-chess-pgn">
<comment>PGN chess game notation</comment>
...
<generic-icon name="application-x-chess-pgn"/>
<glob pattern="*.pgn"/>
<sub-class-of type="text/plain"/>
<magic priority="50">
<match value="[Event " type="string" offset="0"/>
</magic>
</mime-type>