How to open some files based on extension rather than mime type?
Israel
israeldahl at gmail.com
Wed Jan 21 13:15:26 UTC 2015
Hi John,
Thanks for finding this!!
I will have to experiment with using mimeapps.list some.
For all who are interested here is the spec...
$XDG_CONFIG_HOME/$desktop-mimeapps.list user overrides,
desktop-specific (for advanced users)
$XDG_CONFIG_HOME/mimeapps.list user overrides (recommended location for
user configuration GUIs)
$XDG_CONFIG_DIRS/$desktop-mimeapps.list sysadmin and ISV overrides,
desktop-specific
$XDG_CONFIG_DIRS/mimeapps.list sysadmin and ISV overrides
$XDG_DATA_HOME/applications/$desktop-mimeapps.list for completeness,
deprecated, desktop-specific
$XDG_DATA_HOME/applications/mimeapps.list for compatibility, deprecated
$XDG_DATA_DIRS/applications/$desktop-mimeapps.list
distribution-provided defaults, desktop-specific
$XDG_DATA_DIRS/applications/mimeapps.list distribution-provided defaults
Based on that I think you should save the file as (for local users):
~/mimeapps.list
~/lubuntu-mimeapps.list (mayeb lxde??)
then run
echo $XDG_CONFIG_DIRS
if you want to find the specific global directories to change the
## I am using an array here below to indicate you can *probably* use any
directory listed)
${XDG_CONFIG_DIRS[*1*]}*/mimeapps.list*
or one of these:
lubuntu-mimeapps.list
lxde-mimeapps.list
On 01/20/2015 05:06 PM, John Hupp wrote:
> I was looking at this further, and found out that
> /usr/share/applications/defaults.list was officially deprecated in
> 4/14. See, for instance,
> https://mail.gnome.org/archives/distributor-list/2015-January/msg00000.html
> and also the current spec at
> http://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html
> which instead specifies the use of a mimeapps.list at one location or
> another.
>
> Lubuntu 14.04 seems to implement some sort of mixture of the
> deprecated and current spec. I have not been able to pin it down with
> precision.
>
> The LibreOffice installation wrote a full complement of mime type
> associations to /usr/share/applications/defaults.list. But PCmanFM
> does not look at that -- it opens an ODT file with AbiWord. I have
> yet to figure out what it looks at by default. Anyone know?
>
> If I R-click on a file: Open With and check the box to make the
> current app the default for opening the file, then PCmanFM writes to
> ~/.local/share/applications/mimeapps.list with the minimal entries
> required to set the desired mime type association. And then for the
> current user, ODT files open with LibreOffice.
>
> Oddly enough, though PCmanFM writes to a mimeapps.list (named per the
> new spec), ~/.local/share/applications is not one of the lookup
> locations in the new spec.
>
> I copied ~/.local/share/applications/mimeapps.list to
> /etc/xdg/lubuntu/, which is a lookup location in the new spec. Then I
> created a new user and found that my global mimeapps.list was ineffective.
> ....
>> --
>> Regards
>>
>>
>
--
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20150121/652b03ad/attachment.html>
More information about the Lubuntu-users
mailing list