From owner-freebsd-questions@FreeBSD.ORG Thu Feb 23 17:09:42 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C4C516A420 for ; Thu, 23 Feb 2006 17:09:42 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id A67FA43D46 for ; Thu, 23 Feb 2006 17:09:40 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k1NH9CmK031912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 23 Feb 2006 19:09:18 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k1NH8mW0021208; Thu, 23 Feb 2006 19:08:48 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k1NH8lAh021207; Thu, 23 Feb 2006 19:08:47 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 23 Feb 2006 19:08:47 +0200 From: Giorgos Keramidas To: Rob Message-ID: <20060223170847.GA21197@flame.pc> References: <20060223083832.5f39a51c.rob@roblytle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060223083832.5f39a51c.rob@roblytle.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.369, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.83, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr Cc: freebsd-questions@freebsd.org Subject: Re: problem regarding setting DISPLAY env variable and hostname X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2006 17:09:42 -0000 On 2006-02-23 08:38, Rob wrote: > > On 2006-02-22 13:07, Rob wrote: > > > So now Xorg does not give errors on startup or shutdown like the > > > > > > > > bad display name "xenon:0" in "remove" command or > > > > > bad display name "xenon:0 in "list" command > > > > > > But when not setting the DISPLAY variable explicitely anywhere I still > > > get the error: "out of display lists" upon starting the program I want > > > from xterm > > > > > > But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing > > > the program then gives the error: > > > > > > "Can't open display: xenon:0.0" so I guess I am back to square one. > > > > > > Maybe I should call it a day and rest, haha. > > > > Just a wild guess, since I don't see why you should have problems > > running programs like: > > > > Can't open display: xenon:0.0 > > > > Are you running X11 as a plain user and having problems to run programs > > *after* using su(1) to become root or does this happen for all users in > > all terminals? > > Hi Giorgos, > > I am trying to run a program from xterm as a normal user. However, > when su'ing in xterm, I am unable to run any programs. Then I get the > error: > > "Xlib: connection to ":0.0" refused by server > Xlib: No protocol specified > Error: Can't open display: :0.0 That's ok. When you use su(1) to become root, you no longer have permission to open programs on the display of the X server opened by the plain user. > setting for csh as root: setenv DISPLAY xenon:0.0 then gives the error message: > > _XTransSocketINETConnect() can't get address for xenon:6000: hostname nor server name provided, or not known > Error: Can't open display xenon:0.0 Open another xterm, from the X11 session of the plain user, and run: $ xhost +localhost Then you'll be able to `connect' by running as root: xenon# setenv DISPLAY localhost:0 > I seem to remember never being able to su in xterm and be able > to run any programs no matter what combination of settings I > have used. That may be true, depending on the version of X11 that you are running, the current operating system and the setup of the X11 sessions. I can't tell what you had done, since I wasn't there... > I also think that the error messages might have been different > but I am starting to lose track of the error messages for > combinations of settings for hostname, DISPLAY, etc. I > probably need to start putting all of this down on paper so I > can find any patterns. Sure. Keeping notes is always a good idea :)