I'm searching for docs on the "right way" of doing Gnome desktop/mime etc. entries.
I know that the "old way" (before update-desktop-database) still seems to work, either by accident or by design apps that don't use that command in %post still seem to function as intended.
I'm trying to package something that has (at least one) a broken Makefile, as part of make install it want to cat stuff onto /etc/magic, / etc/gnome-vfs-mime-magic, amongst other things that cause to fail when built from a non root user - that I *think* are actually handled by update-desktop-database in the %post script. I do have a problem though -
man update-desktop-database No manual entry for update-desktop-database
:(
Since it looks like I have to fix Makefiles anyway to build the package as an rpm, I'd like to try to do things the right way - I don't think even under gnome-2.4 that cat >> /etc/gnome-vfs-mime-magic was correct (which is what the Msakefile wants to do).
http://www.freedesktop.org/Software/desktop-file-utils
Not very helpful. Is there a helpful guide somewhere?
On Tue, 2004-11-30 at 05:01 +0000, Michael A. Peters wrote:
On 11/29/2004 05:31:09 PM, Michael A. Peters wrote:
I'm searching for docs on the "right way" of doing Gnome desktop/mime etc. entries.
I think I figured it out
Care to post some pointers here for future reference?
On 11/29/2004 11:10:57 PM, Ville Skyttä wrote:
On Tue, 2004-11-30 at 05:01 +0000, Michael A. Peters wrote:
On 11/29/2004 05:31:09 PM, Michael A. Peters wrote:
I'm searching for docs on the "right way" of doing Gnome
desktop/mime
etc. entries.
I think I figured it out
Care to post some pointers here for future reference?
The Makefile was correct in what it wanted to do - since the stuff wasn't defined in /etc/gnome-vfs-mime-magic it needed to be added. Spec files I had looked at before didn't add anything to that because they were already in that file. Tilp isn't so lucky.
It already was defined in /usr/share/file/magic (at least in fc3)
So what I did was patched the Makefile that was causing problems to do nothing, had the %install section install the necessary pieces in /usr/ share/product/magic, and had the %post script check the files and do the Makefile wanted to do.
%post # update magic stuff from broken Makefile MAGIC=/etc/magic GNOME_MAGIC=/etc/gnome-vfs-mime-magic KDE_MAGIC=/usr/share/mimelnk/magic if [ ! -f ${MAGIC} ]; then MAGIG=/usr/share/file/magic fi if [ -f ${MAGIC} ]; then # see if it needs updating if ! grep "**TI85**" ${MAGIC}; then cat %_datadir/tilp/magic/magic >> ${MAGIC} fi fi if [ -f ${GNOME_MAGIC} ]; then # see if it needs updating if ! grep "**TI" ${GNOME_MAGIC}; then cat %_datadir/tilp/magic/gnome-vfs-mime-magic >> ${GNOME_MAGIC} fi fi if [ -f ${KDE_MAGIC} ]; then # see if it needs updating if ! grep "**TI85" /usr/share/mimelnk/magic; then cat %_datadir/tilp/magic/kde.magic >> ${KDE_MAGIC} fi fi update-desktop-database %{_datadir}/applications
That works - the package (tilp - linking software for Ti Calculators) is working as expected in GNOME (well, the SilverLink USB cable doesn't work, not even as root - complains that the device is busy) but it works just fine with the black serial link cable (as root after install, as user after adjusting /etc/security/console.perms)
I don't have a KDE install to try there.
-=- Another odd thing - it wanted to put itself into an "other" menu despite having the category set as
Categories=Application;Accessories;
I poked around in /usr/share/applications it seems to have it show up in Accessories, it needs to be
Categories=Application;Utility;X-Red-Hat-Extra;
which is odd - seems kind of distro specific. But when I patched the .desktop file to change the Category to that - it then showed up in the Accessories menu of the Application menu.
Maybe slightly OT, but I found to be quite hard to switch the program associations desktop wise. For example, in my fresh FC3 install I have pdf files handled by ggv (not that I have something against it...) and I would like to change it for xpdf or gpdf. I think it is not really easy to change this association, at least without digging in the documentation (which, admittedly, I ususally ignore until this problems comes out...).
Is there anything we can do for improving this area?
Cheers
Gianluca