[pygtk] applet with ssh - passphrase problem
Peter Robinson
pjr at itee.uq.edu.au
Tue Apr 17 06:14:16 WST 2007
Gustavo J. A. M. Carneiro wrote:
> 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,
>
Thanks Gustavo,
I did as you suggested and had a look at the diffs between environments
and added environment attributes to the .schema file as suggested in the
referenced bug report. Works fine now :)
Peter Robinson
More information about the pygtk
mailing list