edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Password prompt fails to display when attempting to browse using netrw #184

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT! Before creating a new Issue please search the old Issues for 
duplicates.  Also, 
please do not use this page to ask questions, instead post to the vim_mac 
mailing list.  There are 
more people on that list that can answer questions.  Only file an issue if you 
have found a bug.  
(You can safely delete this text now that you have read it and enter an issue 
report.  Thank you 
for taking the time to report new bugs!)

What steps will reproduce the problem?
1. :tabe scp://user@address.of.ssh.server//

What is the expected output? What do you see instead?
Expected: The line user@address.of.ssh.server's password:
Actual result: MacVim hangs.

What version of MacVim and OS X are you using (see "MacVim->About MacVim" and  
"Apple 
Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6 Intel")?
Snapshot 45, 10.5.7 PPC

Please provide any additional information below.
This command works fine on vim 7.2.22 shipped with Mac OS X 10.5.7

Original issue reported on code.google.com by yuan...@gmail.com on 4 Jun 2009 at 4:48

GoogleCodeExporter commented 9 years ago
Please change the title of the issue to: MacVim fails to display password 
prompt when attempting to browse 
using netrw and the actual result section to: The password prompt was not 
displayed

Original comment by yuan...@gmail.com on 4 Jun 2009 at 4:52

GoogleCodeExporter commented 9 years ago
I think this is related to the ssh_askpass problem mentioned in Issue 166 and 
it has also popped up on the 
vim_mac mailing list a couple of times.  It seems to be some sort of linking 
problem but I'm not sure what to do 
about it.  Any help/patches would be welcome.

Original comment by bjorn.winckler@gmail.com on 5 Jun 2009 at 7:03

GoogleCodeExporter commented 9 years ago
I know what causes this now.  When ssh needs a password it will ask for one.  
If you're running vim in terminal mode it just prompts on the terminal, which 
always works.  If you're in the GUI ssh will try to use the ssh_askpass program 
which unfortunately doesn't exist on Mac OS X.

Here is a temporary workaround:

* download the attached file (macos-askpass) and put it somewhere in your path
* make it executable (chmod a+x macos-askpass)
* invoke MacVim from the terminal like this (the DISPLAY is not needed if it is 
already set)

    SSH_ASKPASS="macos-askpass" DISPLAY=":0" mvim

* you can now :e scp://user@server/

This is a kludge.  I will try to come up with a nicer permanent solution (i.e. 
bundle some askpass program with MacVim and set the environment vars 
automatically).

However, do note that ssh will ask for a password _every time_ you change 
folder, open a file, write a file, whatever.  This quickly gets tedious.  A 
better solution is to set up a private/public key.

Original comment by bjorn.winckler@gmail.com on 7 Apr 2011 at 8:24

Attachments: