Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's my uname -a info ...

Linux qa3398c 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

I'm running some Google Web toolkit tests that require access to a virtual display. I don't know what to set my DISPLAY environment variable to get that functionality. I've tried things like "localhost:0.0", ":0.0" and "0.0", but all result in errors like

Caused by: java.lang.Exception: java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.

How do I figure out what to set my DISPLAY variable to? I have Xvfb installed on the machine.

share|improve this question

X has an authentication mechanism, which decides whether a client is allowed to connect to a server

Without know other details such as the user trying to access X, I can't be as specific with this answer as I would generally like, but you can try this and see if it works:

xhost +localhost

From man page: The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server. In the case of hosts, this provides a rudimentary form of privacy control and security. It is only sufficient for a workstation (sin‐gle user) environment, although it does limit the worst abuses. Environments which require more sophisticated measures should implement the user-based mechanism or use the hooks in the protocol for passing other authentication data to the server.

+ Access is granted to everyone, even if they aren't on the list (i.e., access control is turned off).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .