xdg-open does not use the right application to open file
Submitted by Kong Zhiqiu
Assigned to Allison Lortie @desrt
Description
I'm using xdg-utils 1.0 which was in Ubuntu 8.04 Actually i was learning how to specify the default application used for different formats, and then i found xdg-utils. It is really very useful.
But there's sth i found strange:
in ~/.local/share/applications/defaults.list ~/.local/share/applications/mimeinfo.cache
it wrote like this:
application/pdf=/opt/Adobe/Reader8/Resource/Support/AdobeReader.desktop
in /usr/local/share/applications/defaults.list /usr/local/share/applications/mimeinfo.cache
it wrote like this:
application/pdf=evince.desktop;/opt/Adobe/Reader8/Resource/Support/AdobeReader.desktop
And then i try these:
$ xdg-mime query default application/pdf /opt/Adobe/Reader8/Resource/Support/AdobeReader.desktop
which means the config in .local will override the one in /usr/local/share
but when i use
$ xdg-open some-file.pdf
evince will come up.
It's really a weird thing since double-cliking on pdf file in Nautilus will surely trigger Adobe Reader.
I tried other formats, such as text/xml, and it seems the config of this in .local will override the one in /usr/local/share, which is known as behaving normally.
I don't know if this is a bug of xdg-utils or AdobeReader, so if more infomation is needed, plz let me know.
Thanks.