Date: Sat, 18 Aug 2001 14:07:12 -0400 From: Louis LeBlanc <leblanc+freebsd@acadia.ne.mediaone.net> To: freebsd-questions@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Opening root-windows on userX' display. Message-ID: <20010818140711.A79888@acadia.ne.mediaone.net> In-Reply-To: <20010818053425.CCFQ14731.fepZ.post.tele.dk@there> References: <20010817083259.HICK449.fepA.post.tele.dk@there> <01081723181802.00504@roc-24-169-96-227.rochester.rr.com> <20010818053425.CCFQ14731.fepZ.post.tele.dk@there>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/18/01 07:36 AM, Bjarne Wichmann Petersen sat at the `puter and typed: > On Saturday 18 August 2001 05:18, Justin C Sherrill wrote: > > > I don't know if it's the correct way to do it, but typing "+xhost > > 127.0.0.1" in a terminal window, and then su'ing to root, seems to allow me > > to then launch X apps as root. It just worked now launching an Xterm as > > root, though I'm logged into XWindows as non-root. > > Hey, that works too. But it needs a running X-session and thus there doesn't > seems to be a way to do this automatically? > > Bjarne > I added the following to my personal .xsession file: xhost localhost Then add some environment variable testing to the root init scripts (.bash_profile, .profile, whatever) so that if it doesn't get a DISPLAY setting from its invoking shell (via exported DISPLAY setting), it is automatically set to ":0.0". Then you needn't bother with xhost settings, DISPLAY settings, etc. I use the following in my ~root/.bash_profile # Set DISPLAY if we don't already have it. if [ -z "$DISPLAY" ]; then DISPLAY=127.0.0.1:0.0 export DISPLAY fi Works fine. HTH Lou -- Louis LeBlanc leblanc@acadia.ne.mediaone.net Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://acadia.ne.mediaone.net ԿԬ tax office, n.: Den of inequity. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010818140711.A79888>