GNOME Bugzilla – Bug 748912
1.24 Breaks Custom "ssh" Handler.
Last modified: 2017-10-26 06:41:58 UTC
With version 1.20 and before, I had a custom "x-scheme-handler/ssh" desktop file and mime handler to launch "ssh://" URLs in a terminal process. Upon upgrading to 1.24, this stopped working. When launching a "ssh://" URL via gvfs-open, the following happens: gvfs-open: ssh://user@host: error opening location: The specified location is not mounted This can be circumvented by editing /usr/share/gvfs/mounts/sftp.mount and commenting out the "SchemeAliases=ssh" line. However, upon doing so, the ssh handler still does not work as before. The reason is that the URL is manipulated in the process, and has a slash appended. The paramter "ssh://user@host" becomes "ssh://user@host/". So, the issues are: 1) The ssh scheme handler in the user's XDG directory can no longer override the SchemeAliases line in the system directory. 2) The URL is altered, but it is possible that happens via a codepath followed because of #1. (or "%U" handling in desktop files has changed). Looking at the commits, the problematic logic change possibly could have originated with gvfs commit 95aac171c7b9903fefd7fa22888c32bb08d67132.
Thanks for your bug report. The second issue is definitely caused by the commit you mentioned (see 738690), I'm not sure about the first one...
(In reply to Ondrej Holy from comment #1) > Thanks for your bug report. > > The second issue is definitely caused by the commit you mentioned (see > 738690), I'm not sure about the first one... Of course, it's not entirely clear that it is an issue. The placeholder "%U" is a URL placeholder, and appending the slash at the end would not necessarily be wrong. I've handled it in my little shell script. The real issue is the first part.
You are right, the mentioned commit caused that gvfs-open alter the uri from ssh://user@host -> sftp://user@host/ and then it is looking for default handler for x-scheme-handler/sftp, which is definitely wrong...
*** This bug has been marked as a duplicate of bug 738690 ***
And I just got upgraded to version 1.34.1 with Ubuntu 17.10, and it's broken again. I notice that gvfs-open.c has been cleared out in favour of gio tools, so I assume the breakage is in there somewhere. Quick summary, ssh:// URLs are automatically altered to sftp:// for some reason.
I've proposed the same fix also for gio open, see: https://bugzilla.gnome.org/show_bug.cgi?id=779182 *** This bug has been marked as a duplicate of bug 738690 ***