Date: Fri, 24 Feb 2006 00:26:39 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Rob <rob@roblytle.org> Cc: freebsd-questions@freebsd.org Subject: Re: problem regarding setting DISPLAY env variable and hostname Message-ID: <20060223222639.GA35607@flame.pc> In-Reply-To: <20060223141315.045c061e.rob@roblytle.org> References: <20060223082331.74053568.rob@roblytle.org> <20060223172628.GA21362@flame.pc> <20060223102347.11de9bf7.rob@roblytle.org> <20060223212947.GA35132@flame.pc> <20060223141315.045c061e.rob@roblytle.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-02-23 14:13, Rob <rob@roblytle.org> wrote: > > > > Then you have two options: > > > > 1. Start the X11 server in ``listen mode'', which will enable > > connections to port 6000: > > > > $ startx -listen_tcp > > I tried that and then at the xterm I again gave the commands > > xhost +localhost > su'd > setenv DISPLAY localhost:0.0 > > And I was able to run X programs as root, so that worked. > > > > > 2. Use the ~/.Xauthority file of the user who started the X11 > > session. This can only be done by root or a sufficiently > > privileged user, and it works like this: > > > > $ su - > > Password: **** > > > > After you have gained superuser privileges, you can `merge' the > > proper credentials that will allow you to connect to the running > > X11 session (even though it wasn't `root' that started it), by > > using xauth(1): > > > > csh# setenv DISPLAY localhost:0 > > csh# xauth merge ~user/.Xauthority > > > > Now you should be allowed to run X11 programs just fine. > > I did that and it worked! I stopped and started Xorg and the changes seem to be permanent. > Now I don't have to use the "xhost +localhost" and "setenv DISPLAY localhost:0.0" any more. Great :-) Thanks for taking the time to post a followup, to verify that this was indeed a fix for twhat you were seeing.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060223222639.GA35607>