On Thu, Jul 29, 2010 at 01:35:46PM -0700, Kevin O'Gorman wrote
> I'm not exactly sure when, but starting a month or so ago, vim has been
> acting weird when
> I run it as root.  For one thing, there are messages
>     Xlib: connection to ":0.0" refused by server

  General rule... by default X apps cannot be run by any user other than
the one who started the X session.  This bites you when you launch X as
regular user, and then "su -".  Is vim considered an X app?  Yes, if
you've emerged vim with the X USE flag enabled.  You have two options.

1) Get rid of the X-integration by going into /etc/portage/package.use
and adding the line...

app-editors/vim -X

You'll have to re-emerge vim after making that change.  This gets rid
of X-integration for vim.

2) If you really really need the X-integration features, you can use the
"xhost" command to enable all users on your machine to run X apps on
your X session.  E.g. my machine is 192.168.123.249 so I ran...

  xhost +192.168.123.249

...to allow a 32-bit QEMU-KVM guest to run an X program on the 64-bit
host's Xwindows session.

-- 
Walter Dnes <waltd...@waltdnes.org>

Reply via email to