linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* connection problem to the X server
@ 2004-04-22  7:37 Miguel González Castaños
  2004-04-22 11:32 ` Glynn Clements
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel González Castaños @ 2004-04-22  7:37 UTC (permalink / raw)
  To: linux-admin

Dear all,

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.

Regards and sorry for my english

Miguel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: connection problem to the X server
  2004-04-22  7:37 connection problem to the X server Miguel González Castaños
@ 2004-04-22 11:32 ` Glynn Clements
  0 siblings, 0 replies; 2+ messages in thread
From: Glynn Clements @ 2004-04-22 11:32 UTC (permalink / raw)
  To: Miguel González Castaños; +Cc: linux-admin


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@virgin.net>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-22 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-22  7:37 connection problem to the X server Miguel González Castaños
2004-04-22 11:32 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).