- Can’t connect to X11 window server with DISPLAY variable’s value
- Java Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable
- 31 Answers 31
- vietlq / howto-forward-x11-to-win10-via-putty-vcxsrv.md
- This comment has been minimized.
- SpareSimian commented Oct 1, 2018
- This comment has been minimized.
- revurp commented Jul 31, 2019
- Запустить X11 Server
- Can’t connect to X11 window server using ‘:0.0’ as the value of the DISPLAY variable. #79
- Comments
- EvilBob01 commented Jun 30, 2017
- Serversync Version:
- Minecraft Version:
- Issue:
- rheimus commented Jun 30, 2017
- EvilBob01 commented Jun 30, 2017
Can’t connect to X11 window server with DISPLAY variable’s value
While starting the startInstGui.sh I am getting the following error. I am doing the installation local installation from Root user of linux.
I have tried various option for display but I am getting the same error i.e. «Can’t connect to X11 wi ndow server using ‘172.16.67.57:0.0’ as the value of the DISPLAY variable».
Please suggest ASAP.
============startInstGui.sh output (error log)==========
Java Runtime found in SAPINST_JRE_HOME environment variable
Start mode: gui (GUI only)
GUIServer host: localhost
GUIServer port: 21212
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
Caused by: java.lang.InternalError: Can’t connect to X11 window server using ’17 2.16.67.57:0.0′ as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment. (X11GraphicsEnvironment.java:1 34)
at java.lang.Class.forName0(Native Method)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi ronment.java:62)
at java.awt.Font. (Font.java:353)
at com.sap.sdt.gui.core.settings.GuiSettings.createSAPFonts(GuiSettings. java:394)
at com.sap.sdt.gui.core.settings.GuiSettings. (GuiSettings.java:97)
at com.sap.sdt.gui.core.settings.GuiSettings. (GuiSettings.java:8 6)
java.lang.InternalError: Can’t connect to X11 window server using ‘172.16.67.57: 0.0’ as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment. (X11GraphicsEnvironment.java:1 34)
at java.lang.Class.forName0(Native Method)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi ronment.java:62)
at java.awt.Font. (Font.java:353)
at com.sap.sdt.gui.core.settings.GuiSettings.createSAPFonts(GuiSettings. java:394)
at com.sap.sdt.gui.core.settings.GuiSettings. (GuiSettings.java:97)
at com.sap.sdt.gui.core.settings.GuiSettings. (GuiSettings.java:8 6)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
class [Ljava.lang.String; — [Ljava.lang.String;@b166b5
java.lang.RuntimeException: invocation target exception: Can’t connect to X11 wi ndow server using ‘172.16.67.57:0.0’ as the value of the DISPLAY variable.
SAP Software — NW 2004s SR1
OS — Red Hat Enterprise Linux AS release 4(Nahant Update 4)
OS Kernel — 2.6.9 — 42.EL
Edited by: TP Suresh on Dec 24, 2007 12:27 PM
Java Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable
I have a script using java to connect to display X11 in the port 10.0 at localhost
but i get always this error
I have tried everything to solve this problem like :
I tried also the port 0.0 but i get always the same error
after trying xhost
how can i fix this i thought that the X Server is not runing so i tried startx its says its runing at that port
my system is Ubuntu server edition 10.04
31 Answers 31
This command helped me to solve the problem:
You need to specify the -Djava.awt.headless=true parameter at startup time.
Remove the DISPLAY variable
This helps in most cases (e.g. starting application servers or other java based tools) and avoids to modify all that many command lines.
It can also be comfortable to add it to the .bash_profile for a dedicated app-server/tools user.
I think you are working in sudo mode.Please checkout to the user mode and try again
In case anybody trying to run the automated unit tests via maven-surefire-plugin on CI(jenkins. ), and getting the above mentioned error, be sure to update your surefire plugin configuration :
This will fix it:
For me logging in as -Y instead of -X worked.
In case you’ve got untrusted X11 as shown below, then try -Y flag instead (if you trust the host):
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
After several days of futile effort of installing glassfish on raspberry pi 2 with headless fedora 22, Below worked for me without a hitch
got my help from here
First: start XQuartz
Second: ssh -X user@ip_address
. start your process
if you ssh and then start XQuartz you will get that error
If you are trying to export display using su and it still doesn’t work. This is what worked for me. Try X11 forwarding for sudo users.
Connect the remote host using the -X option with ssh.
Now list the coockie set for the current user.
Switch to another user account using sudo. Add the cookie from the command output above to the sudo user.
Export the display from step 2 again for the sudo user. Try the command xclock to verify if the x client applications are working as expected.
vietlq / howto-forward-x11-to-win10-via-putty-vcxsrv.md
Code2Pro: How to Forward X11 to Windows 10 via PuTTY & vcxsrv
Tested on Windows 10 & Ubuntu 16.
- Check that sshd on Ubuntu is properly configured
The most important line is X11Forwarding yes (it’s added by default, but if not, you can add it).
Then reload sshd:
- Install vim-gtk3 or other packages that have UI on Ubuntu
You can also try gnome-terminal .
- Install VcXsrv Windows X Server
- Download and install: https://sourceforge.net/projects/vcxsrv/
- Check that VcXsrv runs and right-click, get logs to find DISPLAY=127.0.0.1:0.0
- Note down the value of $DISPLAY and pass it ot PuTTY
- Configure PuTTY
- Navigate to SSH => X11 => Tick Enable X11 forwarding
- Pass the value of $DISPLAY (which is 127.0.0.1:0.0 ) to the field X display location
- Launch from Ubuntu
- Use PuTTy to log in as normal
- Run gvim for example on the Ubuntu via PuTTY
- Use the GVim window
This comment has been minimized.
Copy link Quote reply
SpareSimian commented Oct 1, 2018
I found it necessary to install xauth on the Linux box (xorg-x11-xauth package on CentOS) to allow the sshd server to accept the X server’s DISPLAY variable. Otherwise, $DISPLAY was blank. («echo $DISPLAY» on the Linux host to test.) Note that the first connection will complain that
/.Xauthority does not exist. xauth will create that file on the first run.
This comment has been minimized.
Copy link Quote reply
revurp commented Jul 31, 2019
I found it necessary to install xauth on the Linux box (xorg-x11-xauth package on CentOS) to allow the sshd server to accept the X server’s DISPLAY variable. Otherwise, $DISPLAY was blank. («echo $DISPLAY» on the Linux host to test.) Note that the first connection will complain that
/.Xauthority does not exist. xauth will create that file on the first run.
@SpareSimian This worked for me. Thanks!
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Запустить X11 Server
Пытаюсь програмно запусть одну прогу на сервере.
Запускаю процесс $output = popen(«/usr/bin/charlesbg», «r»)
Всегда работало, сегодня не получаетсяю смотрю результат выполнения:
Я так понял надо запустить этот самый X11 Server. Вопрос КАК? по гуглил но пока подходящего решения не нащёл!
Поможет ли тут перезапуск всего сервера?
И вот что интересно в ручную я прогу запускаю без проблем ((
Как запустить sql server?
я установила sql server, но что то я не могу понять одну вещь, я думала что это полноценная.
Как запустить SQL Server
Здравствуйте, установил программу, но не ярлыка на рабочем столе, не чего другого не появилось.
Как запустить Server.Execute?
Есть необходимость в рамках одной асп запустить и выполнить другую с параметрами. код.
Запустить Tcp server в Linux
Добрый день! Пытаюсь приконнектить два tcp сервера друг к другу. Но не выходит и они похоже даже не.
ну это программа на java явно с графическим интерфейсом, как вы ее без графики то используете?
1. Убедись не работaет ли уже X server. Посмотри в процессах X или Xorg
2. Если X server запущен — посмотри что в переменной DISPLAY — если сервер на том же компьютере запущен, то обычно в DISPLAY должно быть значение :1 или :1.0
для того чтобы запустить X server — нужно выполнить команду startx, либо если ее нет, то xinit
но мне кажется что вы что-то делаете не правильно, на сколько я понял, запускаете приложение и через pipe читаете что оно выводит на стандартный вывод, но графические приложения обычно не рассчитаны на такую работу, возможно ошиблись в имени программы?
Мне надо только запустить прогу(она действительно с гуями). что далже уже не важно.
Можете подкинкть какой мануал а то я с линуксом пока не очень ))
Добавлено через 3 минуты
Результат выполнения startx:
Этот самый процесс запускал множество раз
Добавлено через 38 секунд
Может лучше рестарт серверу сделать?
хм, судя по всему X сервер не может определить конфигурацию, это значит что он врятли вообще запускался на этом ПК.
попробуйте сервер рестартнуть, может действительно какие-то хитрые настройки задействованы.
Видеокарта то есть на сервере?
вообще есть варианты с запуском X:
1. X сервер может быть запущен на другом ПК (можно даже запустить x server на windows), но требуется настройка дополнительная — там где будет запущен X сервер, разрешить ему слушать входящие TCP соединения (по умолчанию запрещено), отключить авторизацию, открыть соответствующие порты в файрволле. На той машине где запускается приложение нужно в в DISPLAY прописать :
2. запустить x server которому не нужен настоящий дисплей. искать в гугле headless X server. Или настроить XVNC, или xorgxrdp + xrdp
Can’t connect to X11 window server using ‘:0.0’ as the value of the DISPLAY variable. #79
Comments
EvilBob01 commented Jun 30, 2017
Serversync Version:
Minecraft Version:
Issue:
I’m running a headless (no display or window manager. no GUI installed) Debian Linux server. When I launch I get an error saying it can’t connect to the X windows server. I expected the server option to disable the GUI and not require a display. Am I doing something wrong?
Launching with this command: java -jar serversync-2.6.15.jar server Logs (serverysync & minecraft)
The text was updated successfully, but these errors were encountered:
rheimus commented Jun 30, 2017
Using the server flag when starting serversync should indeed not be running anything from AWT.
EvilBob01 commented Jun 30, 2017
I think I’m starting to understand this. Xauth dosn’t keep the display permissions when you «su» to another user eg: minecraft. The easy fix is to just login as whatever your minecraft user is and start Serversync from that user directly. It does work in screen too 😉
We receive a lot of emails asking how to keep X11-forwarding working after changing user to root inside a SSH session. This is by default not allowed on Unix/Linux systems, because the X11 display connection belongs to the user you used to log with when connecting to your remote SSH server. X11-forwarding mechanism does not allow anyone to use the open display.
Thanks for the reply I’m all good now and I understand what’s going on with my config. You can close this one if you want. Or if you want I’ll be happy to test more.