Nothing happens when clicking on an SFTP File Transfer entry

Bug #42393 reported by Oliver Gerlich
10
Affects Status Importance Assigned to Milestone
service-discovery-applet (Ubuntu)
Invalid
Medium
Sebastian Dröge

Bug Description

The menu of the zeroconf applet on my Ubuntu Dapper Beta2 Live CD shows an submenu "SFTP File Transfer", with one entry in it - this is correct. But clicking on the entry doesn't do anything. I would expect that it opens a Nautilus window with the appropriate sftp:/ URL...

Is there a way to debug this? I saw that there is some interesting stuff under /usr/share/service-discovery-applet/plugins , but fiddling with that didn't do anything.

Btw. when I click on one of the entries under "SSH access", I get a login window for SSH. So basically it seems to work, only not for all services (haven't tried anything besides _ssh._tcp , _sftp-ssh._tcp and _workstation._tcp yet - and the last one doesn't do anything as well, though I don't know what to expect there :-)

This is with version 0.4.1-1ubuntu2 .

Thanks,
Oliver

Revision history for this message
Sebastian Dröge (slomo) wrote :

Is this with python2.4-avahi 0.6.9-2ubuntu7?

Changed in service-discovery-applet:
assignee: nobody → slomo
status: Unconfirmed → Needs Info
Revision history for this message
Oliver Gerlich (ogerlich) wrote :

> Is this with python2.4-avahi 0.6.9-2ubuntu7?

Yes.

Sebastian Dröge (slomo)
Changed in service-discovery-applet:
status: Needs Info → Unconfirmed
Revision history for this message
Sebastien Estienne (sebest) wrote :

have you tried running the applet in a terminal to see the debug output?
in a terminal:
service-discovery-applet -window

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

> service-discovery-applet -window

Didn't know that... It reveals an error message when accessing an SFTP entry (this error doesn't show up when accessing another service). Here is the complete output when clicking the SFTP entry; the stuff after "connecting using nautilus" is the error:

Service data for service 'Shared folders (SFTP) on ubuntu' of type '_sftp-ssh._tcp' in domain 'local' on eth0.0:
        Host ubuntu.local (192.168.0.82), port 22, TXT data: ['org.freedesktop.Avahi.cookie=3566930688', 'path=/home/ubuntu', 'u=ubuntu']
connecting using nautilus
Exception gobject.GError: <gobject.GError instance at 0xb68e69ac> in 'dbus_bindings._GIL_safe_pending_call_notification' ignored

Thanks,
Oliver

Revision history for this message
Sebastien Estienne (sebest) wrote :

it seems the problem happens in "plugins/nautilus.py"

but i can't understand why there is a dbus error, has this file doesn't deal with dbus at all.

what is exporting theses TXT records?

you made a .service for avahi? if so, try removing the TXT entries to test

thanx

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Sorry for the delay... had to install Dapper fully instead of running from LiveCD first.

> it seems the problem happens in "plugins/nautilus.py"

As a side note, I have edited plugins/gconfterminal.py because it also seems to claim to handle _sftp-ssh._tcp service (clicking on an SFTP service entry briefly opened a gnome-terminal window). So I removed the "_sftp-ssh._tcp" bit from the array (?) near the top of gconfterminal.py.

>you made a .service for avahi? if so, try removing the TXT entries to test

This is the /etc/avahi/services/sftp.service file, located on machine "bigbox":

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>

  <name replace-wildcards="yes">SFTP on %h</name>

  <service>
    <type>_sftp-ssh._tcp</type>
    <port>22</port>
<!-- <txt-record>u=oliver</txt-record>
    <txt-record>path=/home/oliver</txt-record> -->
  </service>

</service-group>

Could the error be caused by Nautilus not knowing the password for connecting? I already connected to sftp://<email address hidden>/ , entered the password and checked "remember password in this session", and on a second connect to that URL, I wasn't asked for the password again. But maybe this applet supplies another URL for which the password is not known...

Thanks,
Oliver

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Adding a "print url" in plugins/nautilus.py before "gnome.url_show(url)" showed that the URL is sftp://192.168.0.10:22/

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

This little script might help to reproduce the bug:

#!/usr/bin/python

import pygtk
import gnome

pygtk.require('2.0')
gnome.init("SFTP test", "0.1.0")
gnome.url_show("sftp://bigbox:22")

When run, it gives me this output:

Traceback (most recent call last):
  File "sftp-1.py", line 8, in ?
    gnome.url_show("sftp://bigbox:22")
gobject.GError: Unknown error code: 16

If I point Nautilus to sftp://bigbox:22 , I am asked for the password.
The error codes from url_show seem to be a bit cryptic anyway... Experiments with ftp:// urls gave error codes like 28, 30 or 38 for simple errors (like invalid username, Connection refused etc.), but without any textual explanation... Makes debugging quite difficult.

Thanks,
Oliver

Revision history for this message
Sebastien Estienne (sebest) wrote :

it seems that this bug is not directly related to sda, but it's a bug in gnome python bindings.

That means that i can't fix it in my code.

So maybe it should be reassign to the gnome-python bindings and even sent upstream.

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

> So maybe it should be reassign to the gnome-python bindings and even sent upstream.

If you are sure that you (and I, in the code snippet) call url_show with the correct parameters: yes.

Can you reassign this bug? Or do I have to file another bug report elsewhere?

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Hello,
did you file a bug for gnome-python bindings, or should do that?

After looking more into this, it seems that the problem is that gnome_vfs_url_show() (which is the C function called by Pythons gnome.url_show() ) doesn't show a password dialog, but instead returns an error 16 ("access denied", see http://developer.gnome.org/doc/API/gnome-vfs/gnome-vfs-gnome-vfs-result.html). If I use public key authentication for SFTP (with ssh-keygen etc.), the SFTP entry from s-d-a works nicely, because no password is needed.

Btw. the gnome-vfs doc doesn't mention whether it does authentication itself or whether the caller has to supply username and password eg. with an env var.

So, how should this bug report go on now?
Oliver

Revision history for this message
Sebastien Estienne (sebest) wrote :

olivier, you should file a new bug report about gnome-python, and i'll close this one because it's not a bug in sda itself.

thanx

Revision history for this message
Sebastien Estienne (sebest) wrote :

rejecting this bug because the issue lays in gnome-python

Changed in service-discovery-applet:
status: Unconfirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.