MIME problem with icon spec
fmouse at fmp.com
Wed Apr 22 09:32:36 PDT 2009
Perhaps someone on this list can help me with this problem.
My desktop system is Gentoo, running Gnome, with gnome-mime-data v2.18.0
and shared-mime-info v0.51.
I'm trying to set up custom icons for an application I'm working on
which uses the shared MIME-info database. In particular, I'm trying to
set up an icon which will display within the application's file browse
tree for PHP files, defined as type 'applicaiton/x-php'.
I define a section in $HOME/.local/share/mime/packages/Overrides.xml for
local overrides for MIME type application/x-php. This includes:
<icon name="application-x-php" />
In $HOME/.local/share/icons/hicolor/32x32/mimetypes (any reasonable
size-spec directory will do) I put a symlink for 'application-x-php.png'
to /home/fmouse/var/share/icons/php.png which is where I keep custom
icons. I run update-mime-database.
With this in place, the application segfaults on startup. Likewise
gedit, an established Gnome editor, crashes when I try to bring up the
Open File dialog. So this is apparently a problem with the MIME system,
or my use of it, probably not in the application.
_IF_ I comment out the icon spec element in Overrides.xml, _OR IF_ I
change the MIME type in Overrides.xml to 'text/x-php' (which is
sometimes used for PHP files), then I get no crashes, and in the latter
case the application's file tree icon is the correct, user-defined one
for PHP files. Unfortunately, redefining the MIME type for PHP files
breaks other features in the application so I can't really do this.
The 'icon' spec element is only supposed to be used in unpriv'd accounts
for local redefinition or fine-tuning of a system-defined MIME type, so
there shouldn't be a conflict, but apparently there is.
Lindsay Haisley | "Everything works if you let it"
FMP Computer Services | (The Roadie)
More information about the xdg