After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748912 - 1.24 Breaks Custom "ssh" Handler.
1.24 Breaks Custom "ssh" Handler.
Status: RESOLVED DUPLICATE of bug 738690
Product: gvfs
Classification: Core
Component: general
1.34.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-04 18:27 UTC by Pat Suwalski
Modified: 2017-10-26 06:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pat Suwalski 2015-05-04 18:27:53 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.
Comment 1 Ondrej Holy 2015-05-05 07:24:44 UTC
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...
Comment 2 Pat Suwalski 2015-05-05 16:01:12 UTC
(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.
Comment 3 Ondrej Holy 2015-05-19 11:19:32 UTC
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...
Comment 4 Ondrej Holy 2015-05-19 11:21:38 UTC

*** This bug has been marked as a duplicate of bug 738690 ***
Comment 5 Pat Suwalski 2017-10-25 20:22:33 UTC
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.
Comment 6 Ondrej Holy 2017-10-26 06:41:58 UTC
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 ***