From owner-freebsd-hackers Sun Jan 10 16:18:34 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA05593 for freebsd-hackers-outgoing; Sun, 10 Jan 1999 16:18:34 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ics.com (support [140.186.40.192] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA05585 for ; Sun, 10 Jan 1999 16:18:32 -0800 (PST) (envelope-from kaleb@ics.com) Received: from kaleb.keithley.belmont.ma.us (support [140.186.40.192]) by ics.com (8.9.0.Beta5/8.9.0.Beta5) with SMTP id TAA15728; Sun, 10 Jan 1999 19:17:50 -0500 (EST) Message-ID: <3699577A.2D857063@ics.com> Date: Sun, 10 Jan 1999 20:44:26 -0500 From: "Kaleb S. KEITHLEY" Organization: Integrated Computer Solutions X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 3.0-RELEASE i386) MIME-Version: 1.0 To: dh@enter.net CC: hackers@FreeBSD.ORG Subject: Re: X question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Hauer wrote: > > Hi, > Quick question., I'm no "X" expert. When I open an xterm, and then su to > root in it to run an app as root, (cvsup for example) I get an "unable to open > display localhost:0" error message. What have I missed? Rather off-topic for FreeBSD-hackers--- Did you log in through xdm? If so, the server only knows the xdm-auth credentials for you. When you su to root, Xlib looks in root's ~root/.Xauthority file to find credentials and one of three things happens: 1) there's no ~root/.Xauthority at all, 2) there is a ~root/.Xauthority but there isn't no credential for your $DISPLAY, or 3) there is a ~root/.Xauthority file, and there is a credential for your $DISPLAY, but it isn't valid. The way around this is: as you: %xauth list ... my.host:0 MIT-MAGIC-COOKIE-1 a823117ea138ef897e39ced196d9cb03 my.host/unix:0 MIT-MAGIC-COOKIE-1 a823117ea138ef897e39ced196d9cb03 ... as root: %xauth add my.host:0 MIT-MAGIC-COOKIE-1 a823117ea138ef897e39ced196d9cb0 %xaut add my.host/unix:0 MIT-MAGIC-COOKIE-1 a823117ea138ef897e39ced196d9cb03 If there are XDM-AUTHORIZATION-1 credentials copy those as well. Now root will be able to run X programs in your session. Once you log out and log back in you'll get new credentials and you'll need to repeat the above steps again. -- Kaleb S. KEITHLEY To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message