Problems with Xboard 4.6.2 Desktop Support (Icons for PGN)

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Problems with Xboard 4.6.2 Desktop Support (Icons for PGN)

Postby Sacolevas » 26 Apr 2012, 20:16

Hello, I am using a Linux operating system (with LXDE as desktop environment) and have installed xboard 4.6.2, compiled from source. First at all, I want to say: THANK YOU!!, because several months ago, I had problems to open PGN files directly with xboard (by simply clicking the files) and I asked in this forum about it, when I was using xboard 4.5. Now, this feature is included in the new release, so I am very grateful for that.

However, there is one point still missing: In the release notes it says: "New for XBoard is that 4.6 includes a lot of "desktop support": it defines mime types and icons for pgn, fen and trn files, and associates these file with XBoard in various modes as handler". But, in my file browser (PcmanFM) I see icons for several file types, but my pgn files (which I can open directly with xboard), have no associated icon or at least, the icon showed does not correspond to what you would expect. The icon showed for pgn files is the same you see for executable files (in /usr/bin/, for example) and the icon showed for fen is the same I see for plain text files.

Is there a way to solve the problem? Can I do something before waiting for the next stable version?

Thanks for your attention.
Sacolevas
 
Posts: 4
Joined: 08 Dec 2011, 20:04

Re: Problems with Xboard 4.6.2 Desktop Support (Icons for PG

Postby H.G.Muller » 26 Apr 2012, 20:47

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:

Image

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>
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 16 guests