From: Miklos S. <mi...@sz...> - 2008-01-30 12:38:20
|
> I'm trying to make a GUI frontend for sshfs, but unfortunately, I > found SSH_ASKPASS environment has no effect under sshfs. I know > running ssh under terminal will disable this environment variable, so > I run sshfs with this environment variable exported under file > manager. > I created a script like this: > ----------------------------- > #!/bin/sh > export SSH_ASKPASS=<My program showing a dialog for the uesr to type password> > sshfs <My SSH server>:/ <My mount point> > ------------------------------ > I run the script under terminal. As expected, the password prompt was > showed in the terminal, just like what described in the manpage of > ssh. > And then I run the script under Nautilus, bypassing the terminal, but > my password dialog didn't show at all, and sshfs doesn't work. > > I slightly modified the script, and try sftp and ssh. > ----------------------------- > #!/bin/sh > export SSH_ASKPASS=<My program showing a dialog for the uesr to type password> > sftp <My SSH server> > ------------------------------ > Then, run the script under Nautilus again. The dialog correctly showed > up immediately. > Moreover, I replace sftp in this script with ssh, and my dialog showed > correctly, too. Strange. I haven't tested with Nautilus, but generally SSH_ASKPASS works fine with sshfs. > So, that should be the problem of sshfs. I don't know how could this > happen since nothing unusual was noted in the source code of sshfs. > But it did happened. So please have it fixed or this will disable the > development of any GUI frontend. Thank you. Can you try running your script without Nautilus, but with 'setsid', which should make ssh use the SSH_ASKPASS variable: setsid ./script.sh Another thing you could try, is to redirect the output of the sshfs process to a file in the script, to see what is going wrong. Like this: --------------------- #!/bin/sh export SSH_ASKPASS=my_askpass sshfs my_server:/ /my_mountpoint > /tmp/sshfsout 2>&1 --------------------- Thanks, Miklos |