From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Oeglc-0007JS-4V for garchives@archives.gentoo.org; Fri, 30 Jul 2010 04:00:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56083E08FE; Fri, 30 Jul 2010 03:59:40 +0000 (UTC) Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 46A88E08FE for ; Fri, 30 Jul 2010 03:59:40 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4FAGrqUUxMCpoU/2dsb2JhbACTQIxYcsAihTkEizqDcA X-IronPort-AV: E=Sophos;i="4.55,284,1278302400"; d="scan'208";a="71295556" Received: from 76-10-154-20.dsl.teksavvy.com (HELO waltdnes.org) ([76.10.154.20]) by ironport2-out.pppoe.ca with SMTP; 29 Jul 2010 23:59:38 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Thu, 29 Jul 2010 23:58:38 -0400 From: "Walter Dnes" Date: Thu, 29 Jul 2010 23:58:38 -0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Ever since a recent update, vim misbehaves when run as root Message-ID: <20100730035838.GB22462@waltdnes.org> References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: f7865449-c890-4e97-b503-2d4ebeeb5533 X-Archives-Hash: 8a6a2428297618e0685540de28337b01 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