[workaround] vi trying to connect to X
When I "su" to root and start "vi", a bunch of these messages appear:
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Xlib: connection to ":0.0" refused by server
Chris Howie explained:
> vim tries to connect X for access to the X clipboard.
> :help x11-selection
I think this is not a clever thing to do. Obviously, when I enter 'vi' in
a shell, I do not want to use the X11 GUI in any way. If I wanted to, I'd
This problem only appears when I "su" to root. To fix it, I created a vim
configuration file /root/.vimrc containing the following line:
As described in :help options, this has the same effect as using the -X
argument on the command line (which fixes this problem, too).
Refactor, don't archive! - SamHasler - 28 Aug 2004 - twiki.org