FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 07-29-2010, 08:35 PM
"Kevin O'Gorman"
 
Default Ever since a recent update, vim misbehaves when run as root

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
 
Old 07-30-2010, 03:58 AM
"Walter Dnes"
 
Default Ever since a recent update, vim misbehaves when run as root

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>
 
Old 07-30-2010, 06:54 AM
Steffen Loos
 
Default Ever since a recent update, vim misbehaves when run as root

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
 
Old 07-30-2010, 08:08 AM
Neil Bothwick
 
Default Ever since a recent update, vim misbehaves when run as root

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.
 
Old 07-30-2010, 01:43 PM
Bill Longman
 
Default Ever since a recent update, vim misbehaves when run as root

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
 

Thread Tools




All times are GMT. The time now is 04:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org