public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Ever since a recent update, vim misbehaves when run as root
Date: Thu, 29 Jul 2010 23:58:38 -0400	[thread overview]
Message-ID: <20100730035838.GB22462@waltdnes.org> (raw)
In-Reply-To: <AANLkTim_XkrejqsSdFg4TPpJ7-moN7aAd+ZOQmZHS_dQ@mail.gmail.com>

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 <waltdnes@waltdnes.org>



  reply	other threads:[~2010-07-30  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 20:35 [gentoo-user] Ever since a recent update, vim misbehaves when run as root Kevin O'Gorman
2010-07-30  3:58 ` Walter Dnes [this message]
2010-07-30  6:54   ` Steffen Loos
2010-07-30  8:08   ` Neil Bothwick
2010-07-30 13:43   ` Bill Longman
2010-07-30 14:59     ` Kevin O'Gorman
2010-07-30 15:09       ` Kevin O'Gorman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100730035838.GB22462@waltdnes.org \
    --to=waltdnes@waltdnes.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox