public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Ever since a recent update, vim misbehaves when run as root
@ 2010-07-29 20:35 Kevin O'Gorman
  2010-07-30  3:58 ` Walter Dnes
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin O'Gorman @ 2010-07-29 20:35 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

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
on the console.  I presume this is an X authority thing, but I'm not sure
why it became an
issue when it wasn't before, and I've completely forgotten what to do about
it.  I'm generally
running a gnome-terminal 2.26.3.1 under KDE on plain Gento.

It's weird, I know, but I've been doing this for ages. Moreover, in spite of
weirdness, the editing session works.

Except that there are messages
   Xlib: No protocol specified
overlaid on the document scattered more or less randomly.  They can be
cleaned off by
control-L.

This is barely workable, and leaves me with a WTF sort of feeling.
Fortunately, I don't do a whole lot of editing as root, but there's always
something...

Any clues out there?

-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 1058 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Ever since a recent update, vim misbehaves when run as root
  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
  2010-07-30  6:54   ` Steffen Loos
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Walter Dnes @ 2010-07-30  3:58 UTC (permalink / raw
  To: gentoo-user

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>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Ever since a recent update, vim misbehaves when run as root
  2010-07-30  3:58 ` Walter Dnes
@ 2010-07-30  6:54   ` Steffen Loos
  2010-07-30  8:08   ` Neil Bothwick
  2010-07-30 13:43   ` Bill Longman
  2 siblings, 0 replies; 7+ messages in thread
From: Steffen Loos @ 2010-07-30  6:54 UTC (permalink / raw
  To: gentoo-user

Am 30.07.2010 05:58, schrieb Walter Dnes:
> 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.

... or you start with:
~# vim -X

regards,
Steffen



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Ever since a recent update, vim misbehaves when  run as root
  2010-07-30  3:58 ` Walter Dnes
  2010-07-30  6:54   ` Steffen Loos
@ 2010-07-30  8:08   ` Neil Bothwick
  2010-07-30 13:43   ` Bill Longman
  2 siblings, 0 replies; 7+ messages in thread
From: Neil Bothwick @ 2010-07-30  8:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

On Thu, 29 Jul 2010 23:58:38 -0400, Walter Dnes wrote:

> 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.

3) emerge x11-misc/sux and us that instead of su.


-- 
Neil Bothwick

Never argue with an idiot. First, they bring you down to their level.
Then they beat you with experience.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Ever since a recent update, vim misbehaves when run as root
  2010-07-30  3:58 ` Walter Dnes
  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
  2 siblings, 1 reply; 7+ messages in thread
From: Bill Longman @ 2010-07-30 13:43 UTC (permalink / raw
  To: gentoo-user

On 07/29/2010 08:58 PM, Walter Dnes wrote:

> 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.

What you probably want here instead is:

xhost +local:

then the X app is not limited to using only IP but can choose whichever
transport it deems best. Of course the usual safety caveats apply. If
others are on your host, they'll have X access. If you're concerned
about that, then just give root permission:

xhost SI:localuser:root



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Ever since a recent update, vim misbehaves when run  as root
  2010-07-30 13:43   ` Bill Longman
@ 2010-07-30 14:59     ` Kevin O'Gorman
  2010-07-30 15:09       ` Kevin O'Gorman
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin O'Gorman @ 2010-07-30 14:59 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

On Fri, Jul 30, 2010 at 6:43 AM, Bill Longman <bill.longman@gmail.com>wrote:

> On 07/29/2010 08:58 PM, Walter Dnes wrote:
>
> > 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.
>
> What you probably want here instead is:
>
> xhost +local:
>
> then the X app is not limited to using only IP but can choose whichever
> transport it deems best. Of course the usual safety caveats apply. If
> others are on your host, they'll have X access. If you're concerned
> about that, then just give root permission:
>
> xhost SI:localuser:root
>
> Thanks -- that was what I was trying to remember, so I just emerged it.

Looks like something I should be able to do in my .bashrc and just forget
about.


-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 1455 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Ever since a recent update, vim misbehaves when run  as root
  2010-07-30 14:59     ` Kevin O'Gorman
@ 2010-07-30 15:09       ` Kevin O'Gorman
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin O'Gorman @ 2010-07-30 15:09 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]

On Fri, Jul 30, 2010 at 7:59 AM, Kevin O'Gorman <kogorman@gmail.com> wrote:

>
>
>> then the X app is not limited to using only IP but can choose whichever
>> transport it deems best. Of course the usual safety caveats apply. If
>> others are on your host, they'll have X access. If you're concerned
>> about that, then just give root permission:
>>
>> xhost SI:localuser:root
>>
>> xhost +local:
> Thanks -- that was what I was trying to remember, so I just emerged it.
>
> Looks like something I should be able to do in my .bashrc and just forget
> about.
>
> Actually, it doesn't work.

kevin@treat ~ $ xhost si:localhost:root
localhost:root being added to access control list
X Error of failed request:  BadValue (integer parameter out of range for
operation)
  Major opcode of failed request:  109 (X_ChangeHosts)
  Value in failed request:  0xe
  Serial number of failed request:  7
  Current serial number in output stream:  9

kevin@treat ~ $ xhost SI:localhost:root
localhost:root being added to access control list
X Error of failed request:  BadValue (integer parameter out of range for
operation)
  Major opcode of failed request:  109 (X_ChangeHosts)
  Value in failed request:  0xe
  Serial number of failed request:  7
  Current serial number in output stream:  9
kevin@treat ~ $

What's worse, the xhost man page refers me to Xauthority(7) which does not
exist, and I did
not find it with a quick check by eix.

What did work was
  xhost +root@localhost


-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 3667 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-30 15:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox