Как мне выяснить, на что установить переменную DISPLAY для виртуального дисплея?

1728
Dave

Вот моя uname -aинформация ...

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 

Я запускаю несколько тестов Google Web toolkit, которые требуют доступа к виртуальному дисплею. Я не знаю, как установить переменную окружения DISPLAY, чтобы получить эту функциональность. Я пробовал такие вещи, как "localhost:0.0", ":0.0"и "0.0", но все приводят к ошибкам, как

Причина: java.lang.Exception: java.lang.InternalError: Невозможно подключиться к серверу окон X11, используя localhost: 0.0 в качестве значения переменной DISPLAY.

Как мне выяснить, на что установить переменную DISPLAY? У меня установлен Xvfb на машине.

3

1 ответ на вопрос

0
nottings

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).

Похожие вопросы