gmarik/sudo-gui.vim — pull request #4 by kirelagin (2014-04-25 19:41:59+00:00)
Title: polkit knows better when to use console prompt

If there is no GUI authentication agent available, `pkexec` will use text prompt to ask for a password.
This will also work with console vim when it is running inside a terminal in X.

I have no idea whether OS X will fallback to text prompt if there is no GUI available… if it will, it might be better to remove this `gui_running` check at all.