[pygtk] applet with ssh - passphrase problem
Gustavo J. A. M. Carneiro
gjc at inescporto.pt
Mon Apr 16 18:53:42 WST 2007
On Seg, 2007-04-16 at 12:32 +1000, Peter Robinson wrote:
> I am writing an applet to manage an sshfs mount.
>
> The code that mounts the file system is
> retcode = subprocess.call(['sshfs', self.mountfilesys, self.mountpt])
>
> I have set up my ssh connection to require a passphrase.
>
> When I add the applet to the panel and call the above code it asks for
> my passphrase.
> If I run the app as stand alone then it does the mount without requiring
> the passphrase (because pam is handling things)
Are you sure of this? Maybe when you try it on the command line it
doesn't ask for passphrase because it already asked before for the
applet. You most likely have some sort of ssh agent running (such as
seahorse). Pam does not usually take care of this (though it is
possible to make pam do it as well).
>
> Why do I get different behaviours and how can I fix the problem?
I would suggest you print os.environment to a file (one key,val pair
on each line) in both cases, and compare the results. You'll be able to
determine which environment variable is responsible.
Also check for tips on this bug:
http://bugzilla.gnome.org/show_bug.cgi?id=389984
Regards,
--
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic
More information about the pygtk
mailing list