GNOME Bugzilla – Bug 141851
"Protocol error"/"generic error" when viewing images via sftp
Last modified: 2004-12-22 21:47:04 UTC
Using GNOME 2.6 RPMs from fedora-devel (rawhide), gnome-vfs2-2.6.0-6 and eog-2.6.0-2. Connect using nautilus (or the file chooser with eog) to sftp://someplace and select image.jpg and open with eog. It displays fine. Now do the same thing again, with another image also via sftp. It fails, giving: "Reason: Protocol error." The problem appears to be with eog-image-viewer. If I kill this process and try another image, it works. With this process running, I get "Protocol error."
I have even less success than you; I haven't managed to open an image over sftp at all. When I try I get an dialog saying that the file doesn't exist, which it clearly does. I'll attach a screenshot blow for clarity (or visual proof if you will;-))
Created attachment 27484 [details] Screenshot showing what happens if I try to open an image over sftp
Actually, it appears to work when I have an RSA key set up with the remote host, and my key registered with ssh-agent. (By work, I mean as I described in the original report: works the first time, but not subsequent times.) However if Nautilus has to prompt me for the password, or it's already remembered by gnome-key-ring, then you're right, it doesn't work at all, and I get the file doesn't exist error.
Ah - interesting! I can confirm the exact same behaviour (only difference is that I tried with DSA key). I guess a lot of the "geeks" don't see the complete failure because they use rsa/dsa keys to access their remote hosts.
So, this can only be reproduced when using password authentication via sftp:// ? I use public key without a password for the sftp:// shares on my desktop, and I've never encountered this.
Not exactly. Recap: When using passwordless RSA/DSA (or if ssh-agent knows the key), loading an sftp:// image in eog works the first time, but fails every other time with "protocol error." When you are prompted for the password (by gnome-vfs, or nautilus, or maybe gnome-keyring-daemon, I'm not sure which one does the prompting) to an sftp:// address, it simply does not work at all, and says the file can't be found.
OK. I reproduced the behavior you cited for using RSA/DSA. The first two images loaded fine. With the next (third) image the eog window opened, but instead of the image showing up in the window, I got an error dialog saying the image couldn't be opened because of a "generic error". And after that, each image I try to open gives me the same behavior, except, instead "generic error" I get "protocol error". This is with CVS HEAD, gnome26 branch (compiled May 18). I haven't tested it with password authentication.
EOG should be able to use gnome-vfs/libgnomeui authentication callbacks if you need to provide login / password to a sftp server (non using passwordless RSA/DSA keys). Next patch adds a call to gnome_authentication_manager_init () so it would be able to open remote files that needs authorization (and for sftp it should use gnome-keyring go go go!). I've tried to add it also to the collection component to be able to browse sftp:// dirs with nautilus but it's failing. BTW I think this patch is a Good Thing (tm)
Created attachment 29622 [details] [review] Patch for authetication support
Thanks for the work Fernando. Do you know any example code/documentation where I can have a look at? BTW: Please note, that the collection component has been removed in 2.7.x (CVS HEAD).
Applied the patch. Thanks.