1 |
On Thu, Jul 29, 2010 at 01:35:46PM -0700, Kevin O'Gorman wrote |
2 |
> I'm not exactly sure when, but starting a month or so ago, vim has been |
3 |
> acting weird when |
4 |
> I run it as root. For one thing, there are messages |
5 |
> Xlib: connection to ":0.0" refused by server |
6 |
|
7 |
General rule... by default X apps cannot be run by any user other than |
8 |
the one who started the X session. This bites you when you launch X as |
9 |
regular user, and then "su -". Is vim considered an X app? Yes, if |
10 |
you've emerged vim with the X USE flag enabled. You have two options. |
11 |
|
12 |
1) Get rid of the X-integration by going into /etc/portage/package.use |
13 |
and adding the line... |
14 |
|
15 |
app-editors/vim -X |
16 |
|
17 |
You'll have to re-emerge vim after making that change. This gets rid |
18 |
of X-integration for vim. |
19 |
|
20 |
2) If you really really need the X-integration features, you can use the |
21 |
"xhost" command to enable all users on your machine to run X apps on |
22 |
your X session. E.g. my machine is 192.168.123.249 so I ran... |
23 |
|
24 |
xhost +192.168.123.249 |
25 |
|
26 |
...to allow a 32-bit QEMU-KVM guest to run an X program on the 64-bit |
27 |
host's Xwindows session. |
28 |
|
29 |
-- |
30 |
Walter Dnes <waltdnes@××××××××.org> |