On Thu, Oct 16, 2008 at 4:30 PM, Lachlan Michael wrote:
>> No. It shows that Evolution uses defferent path than Nautilus.
>> Seems like Nautilus uses GIO (discovered by Nautilus' behavior, I'm
>> did'n look into sources), while Evolution uses Gnome-VFS as your
>> investigation shows.
>> If I recall and understand correctly,
>> these pathes are different since glib-2.16,
>> Appropriate ChangeLog entry is (gio/ChangeLog):
>> 6461 alexl 2008-02-06 Alexander Larsson
>> 6461 alexl
>> 6461 alexl * gdesktopappinfo.c:
>> 6461 alexl Update to use both mimeapps.list and
>> 6461 alexl defaults.list as discussed on xdg list.
>> Workaround: use hand-written defaults.list
>> (~/.local/share/applications/defaults.list) for enforse need
>> association.

> Ok, I found the mimeapps.list file in ~/.local/share/applications
> Contents are
> [Added Associations]
> application/pdf=evince.desktop;userapp-env-XTALHU.desktop;
> video/ogg=totem.desktop;
> image/png=eog.desktop;inkscape.desktop;
> application/x-ms-dos-executable=wine.desktop;
> application/msword=openoffice.org-2.4.1-writer.desktop;openoffice.org-2.4.0-writer.desktop;
> application/vnd.oasis.opendocument.text=openoffice.org-2.4.1-writer.desktop;openoffice.org-2.4.0-writer.desktop;
> application/vnd.ms-excel=userapp-openoffice.org-L7URHU.desktop;openoffice.org-2.4.1-calc.desktop;
> image/jpeg=eog.desktop;
> application/postscript=evince.desktop;gimp.desktop;
> application/x-tgif=userapp-tgif-OJ3YHU.desktop;
> text/html=firefox3.desktop;
> which looks pretty awful to me. Openoffice.org 2.4.0 was upgraded ages
> ago, and the .desktop files look wrong too.

Nothing wrong in reference to OOo-2.4.0 because there is reference to
the 2.4.1 also (as you may notice, the right-hand side of every line
is a list). References to the non-existent apps just "dropped" (don't
used for actual processing).

> Anyway following your advice and creating a defaults.list based on
> http://bbs.archlinux.org/viewtopic.php?pid=381555
> using only the 2 lines for powerpoint
> [Default Applications]
> application/mspowerpoint=impress.desktop
> application/vnd.ms-powerpoint=impress.desktop
> I tried again, but with no visible change in behavior. (Also logged in
> again in case the file was read in then)
> impress.desktop exists in
> /usr/local/openoffice.org-2.4.1/share/xdg/impress.desktop

AFAIK, this patch (/usr/local/openoffice.org-2.4.1/share/xdg/) is not
used for desktop files searching. Therefore, existence of
impress.desktop there have nothing for system.

> Can you spot anything that might be wrong?
> Again, no problems in nautilus, just in Evolution.
> Actually, re-reading your e-mail and the changelog it seems that
> defaults.list is for GIO which is used by Nautilus which is ok. It is
> Evolution (using GVFS) that I need to fix ...

No, GIO uses defaults.list _and_ mimeapps.list. Gnome-VFS only
defaults.list. At least it is my impression.

My adwise:
1. open directory with file in question by Nautilus, right-click on
the file, select "properties" (or how this menu item called in
English) and look on MIME Type.
For example, my GNOME installation defines microsoft word .doc as
"application/msword" and .xls as "application/vnd.ms-excel".

2. Add association between this MIME Type and application to the
defaults.list. You can fing appropriate line in the mimeapps.list
(reason: if Nautilus OK, then it is ether heuristic is OK (not our
case), or corrected defaults are there), just select one application,
just to be safe (I don'y know whether defaults.list allows multiple
applications). E.g. for ""application/msword" it is
"openoffice.org-2.4.1-writer.desktop", and for
"application/vnd.ms-excel" it is "openoffice.org-2.4.1-calc.desktop"
most probable, basing on mimeapps.list cited by you.

3. Write appropriate default.list. For our example with .doc and .xls
it would be

[Default Applications]

Pay attention on the trailing semicolon (';'), it is required even
when list contains only one element.

Again, sorry, I don't know whether multiple applications may be listed
in the defaults.list for one mime-type. In the mimeapps.list they
can. But in defaults.list -- don't know.

Andrew W. Nosenko
freebsd-gnome@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org"