Re: connection problem to the X server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miguel González Castaños wrote:

> I have a web application developed using JSPs, that needs to connect to 
> a X server to show a statistics graphic. The logs when I issue an "xhost 
> + localhost" of Tomcat gives this :
> 
> Xlib: connection to "localhost:0.0" refused by server
> Xlib: No protocol specified
> 
> xhost:  unable to open display "localhost:0.0"
> 
> When I issue a xhost to a different box, it doesnt fail. I have been 
> googling a bit, I got the impression that using xhost is not safe, and 
> it is better to use xauth. Anyway I still dont know how to fix this.

If the X server is already using X authentication, it won't allow
xhost to connect. Run xhost without arguments; if you get the
response:

	$ xhost
	access control enabled, only authorized clients can connect

then the X server is using X authentication. In that case, you will
have to copy the necessary authentication credentials into a file
which can be read by Tomcat, and set the environment variable
XAUTHORITY to refer to that file. See "man xauth" for details.

-- 
Glynn Clements <glynn.clements@xxxxxxxxxx>
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux