We have moved to a new Sailfish OS Forum. Please start new discussions there.
7

xdg-open no longer working

asked 2015-09-18 09:36:58 +0300

Holger gravatar image

updated 2015-09-18 09:38:14 +0300

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 flag offensive close delete

Comments

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

tortoisedoc ( 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]
text/plain=finpad.desktop
objectifnul ( 2015-09-18 10:31:21 +0300 )edit

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

tortoisedoc ( 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.

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

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

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

4 Answers

Sort by » oldest newest most voted
5

answered 2015-11-03 19:58:24 +0300

tigeli gravatar image

updated 2015-11-03 20:09:07 +0300

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.

edit flag offensive delete publish link more

Comments

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.

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

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

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

answered 2015-09-19 15:08:48 +0300

tortoisedoc gravatar image

updated 2015-09-19 17:51:24 +0300

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!

edit flag offensive delete publish link more
2

answered 2015-11-04 20:47:31 +0300

tortoisedoc gravatar image

updated 2015-11-04 20:52:26 +0300

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?

edit flag offensive delete publish link more
1

answered 2016-07-22 09:29:39 +0300

tortoisedoc gravatar image

xdg-utils was upgraded to 1.1.1 in 2.0.3.11

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2015-09-18 09:36:58 +0300

Seen: 1,171 times

Last updated: Jul 22 '16