# xdg-open no longer working

Using 1.1.7.28 I noticed that xdg-open does not work as before: I have set tinyedit to open plain text files, for example. But it opens the Documents app instead, which is not capable to proceed text files. Copying .local/share/applications/mimetype.list to defaults.list in the same directory makes it working again.

edit retag close delete

2

YES! I have been noticing the same already in earlier versions! 'There is a bug somewhere in the xdg vs. mime configuration, at least thats as far as my investigation went...

THANK YOU for showing me its not only in my head :D

( 2015-09-18 10:15:58 +0300 )edit
1

The issue is possibly related with some inconsistency in file naming. In "/home/nemo/.local/share/applications" you may find "mimeapps.list" or "defaults.list" or both, depending on the SFOS release you are running. As far as I'm concerned, I keep both and manage them manually.

Currently, both files state this:

[Default Applications]

( 2015-09-18 10:31:21 +0300 )edit

Does removing these files completely (and hence rely only on the system ones) fix things?

( 2015-09-18 10:52:50 +0300 )edit

Not sure, as XDG seems to be inconsistent with SFOS behaviour. In other words, SFOS may believe the file to comply with is "defaults.list" when XDG believes it's "mimeapps.list".

Have a look at

/usr/bin/xdg-mime


and search occurrences of ".list" string.

( 2015-09-18 10:56:08 +0300 )edit

@tortoisedoc: No, removing both files does fix the issue. Still not working.

( 2015-09-18 11:14:03 +0300 )edit

Sort by » oldest newest most voted

Good news: the xdg-utils itself is not broken.

Bad news: SFOS uses mer-core provided xdg-utils which has a patch for xdg-open to call lca-tool (https://git.merproject.org/mer-core/libcontentaction) before xdg-open itself takes any action. The lca-tool itself only supports defaults.list and not mimeapps.list (https://bugs.merproject.org/show_bug.cgi?id=1404).

Anyway there was a bug (https://bugs.merproject.org/show_bug.cgi?id=971) which got fixed in May 2015 and "broke" reading of user defined mimeapps.list as it's not supported by lca-tool.

Workaround: Until lca-tool supports mimeapps.list, use defaults.list instead.

more

xdg-open relies on defaults.list as well. I recently noticed libcontentaction does rely on defaults.list as well (hardcoded). I am tempted to say the buggy lca-tool which got fixed not to be related in any way to this problem.. but I might be wrong.

( 2015-11-04 17:19:32 +0300 )edit

PS : great to see development on this issue btw :)

( 2015-11-04 20:59:31 +0300 )edit

Have made some additional investigations, and dropped the info here : http://kastlunger.blogspot.fi/

have a look if you want :). Long story short, issue is in the xdg-utils package.

FWIW, perhaps mer mantainers should consider upgrading to the more recent (still in development) branch of xdg-utils, which got rid of the deprecated defaults.list.

But for now, a symlink from mimeapps.list to defaults.list will do the trick!

more

Btw, there is a rather new security leak related to xdg-open : https://lwn.net/Articles/629718/ (CVE-2015-0361) has a fix been included already?

more

xdg-utils was upgraded to 1.1.1 in 2.0.3.11

more