connection problem to the X server
am 22.04.2004 09:37:12 von mgc
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
-
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
Re: connection problem to the X server
am 22.04.2004 13:32:22 von Glynn Clements
Miguel Gonz=E1lez Casta=F1os wrote:
> I have a web application developed using JSPs, that needs to connect =
to=20
> a X server to show a statistics graphic. The logs when I issue an "xh=
ost=20
> + localhost" of Tomcat gives this :
>=20
> Xlib: connection to "localhost:0.0" refused by server
> Xlib: No protocol specified
>=20
> xhost: unable to open display "localhost:0.0"
>=20
> When I issue a xhost to a different box, it doesnt fail. I have been=20
> googling a bit, I got the impression that using xhost is not safe, an=
d=20
> 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.
--=20
Glynn Clements
-
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