xdg-open is currently unusable for magnet links on desktop environments that rely on the 'gio open' handler (and gvfs-open on gnome 3.24+). Here are a couple bugs for context: https://bugzilla.redhat.com/show_bug.cgi?id=1426299 https://bugzilla.gnome.org/show_bug.cgi?id=779182 While the second bug is working on a possible fix for the issue in gio-tool itself, it isn't clear that the change is going to be implemented anytime soon, and applications that currently rely on xdg-open for certain URIs such as magnet links are broken. I'm not exactly sure what additional functionality would be lost by just using the generic handler, but at least that one works in this situation where gio is trying to mutate the URI incorrectly.
I can confirm this. I encountered this through http://doc.qt.io/qt-4.8/qdesktopservices.html#openUrl failing. Simply xdg-open fails as well. A strace reveals that gio is used.
Further I have to say that it weird, sometime it works sometimes not. Somehow the filemanager plays a role too. Nemo does not have this problems while nautilus does. $ strace -f xdg-open "/home/manuel/documents/uni/kurse/ml/Machine learning 2017" 2>&1 | grep execve execve("/usr/bin/xdg-open", ["xdg-open", "/home/manuel/documents/uni/kurse"...], 0x7ffc1905f720 /* 49 vars */) = 0 [pid 28094] execve("/usr/bin/gio", ["gio", "help", "open"], 0x1948620 /* 49 vars */) = 0 [pid 28095] execve("/usr/bin/gio", ["gio", "open", "/home/manuel/documents/uni/kurse"...], 0x1948620 /* 49 vars */) = 0 $
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/109.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.