[PC-BSD Dev] Gnome 3 mimetypes possible fix for PBI's

Joe Maloney jmaloney at pcbsd.org
Tue Feb 25 09:44:08 PST 2014


Guys.  I think I may have came up with a better solution.  I was looking at
how packages behave regarding mimeinfo and packages write to
/usr/local/share/applications/mimeinfo.cache each time a package is
installed.  That's why packages show up in system-settings,details,default
applications in Gnome3.  I've noticed this file is much emptier with
fluxbox installed but it does exist with things like gimp set out of box.
As far as I can tell this file is generated by those installed packages and
not pc-extractoverlay?

So after installing Gnome3 I updated this file after determining what the
format should be from a pkg with the information for the firefox pbi.

http://pastebin.com/e0az1pmL

Would it perhaps be better to have PBI's such as firefox, firefox-esr,
chromium, thunderbird, libreoffice*, openoffice* update mimeinfo.cache the
same way as packages when PBI's are installed?  This should also fix things
like libreoffice missing from Gnome's open with dialog.

The only side effect I think a user might see from this is that if firefox
is installed from pbi & pkg you might have 2 firefox options unless the PBI
title is renamed to FireFox PBI or something like that.  I suppose I can
still generate a mimeinfo.cache, or mimeapps.list file.  I just thought
this might be a cleaner way to do it per app instead going forward.  Any
thoughts?

Joe Maloney


On Mon, Feb 24, 2014 at 1:59 PM, Kris Moore <kris at pcbsd.org> wrote:

>  On 02/24/2014 13:39, Joe Maloney wrote:
>
> I've noticed this behavior for a long time with PBI's and Gnome 3.
>  Basically PBI's can't be set as default unless they are added to
> mimeapps.list.  Which appears to be something that only Gnome based
> desktops might use from what I can tell?  Here is an example file where I
> have added several PBI's into the file.  I could modify this file under
> /usr/local/share/applications (globally) or my home directory
> .local/share/applications.
>
>
> https://github.com/pkgdemon/freebsd-pkgdemon/blob/master/examples/gnome-mime-types/mimeapps.list-sample
>
>  You will see in this file I've added mime types for things like the web
> browser, which I had installed at the time via a PBI in an older version of
> PCBSD.  I'm wondering if it might not be a bad idea to create like a
> template /usr/local/share/applications/mimeapps.list that get's added with
> pc-extractoverlay that just has all of the common browsers, mail clients,
> etc.  This way a user could go into system-settings details within gnome
> and select a default browser and so on just like they could with a package.
>  I'm not entirely sure this will work yet or if I can add more than one
> entry per type in mimeapps.list.  I wanted to see if you guys might have
> any knowledge of it first and see what your thoughts were or if anyone
> might know of another way to solve this?
>
>  Joe Maloney
>
>
>
> _______________________________________________
> Dev mailing listDev at lists.pcbsd.orghttp://lists.pcbsd.org/mailman/listinfo/dev
>
>
> I've had to do this in the past, so if GNOME requires it then it shouldn't
> be to much of a problem to do it again. Feel free to commit a fix to the
> pc-extractoverlay/ports-overlay directory with a sane list of "defaults" in
> /usr/local/share/applications/mimeapps.list. We can then test it in the
> Edge package set for a while, make sure it doesn't break any other DE's.
>
> --
> Kris Moore
> PC-BSD Software
> iXsystems
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/dev/attachments/20140225/8798878b/attachment.html>


More information about the Dev mailing list