I am trying to install a program on RedHAt7 using ssh / connecting to server. I received the output the following
Exception in thread “main” java.lang.ExceptionInInitializerError at org.greenstone.gatherer.Gatherer.init(Gatherer.java:284) at org.greenstone.gatherer.Gatherer.(Gatherer.java:234) at org.greenstone.gatherer.GathererProg.main(GathererProg.java:78)Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at sun.awt.HeadlessToolkit.getScreenSize(Unknown Source) at org.greenstone.gatherer.Configuration.(Configuration.java:111) … 3 moreHow to fix X11 Display?
If X server is running on the target host and you want the program to display there, you usually perform “export DISPLAY=:0” where :0 would mean the first X server running. If you are running several X servers (for example Xvnc) on the target host, :0 may become :1 or another number, depending on X server configuration.
If you have X server running locally (the machine you are connecting from) you could use “ssh -X …” or “ssh -Y” to log in to the host and forward your display to the program run remotely. See other answers on redirecting X server over SSH.
Edit: Please check the answer in the linked article.TL;DR:
Ensure xauth is installed on targetIn /etc/sshd_config set X11Forwarding yesRun ssh with -vv to check what is the problem, if any
Thanks for contributing an answer to Super User!
Please be sure to answer the question. Provide details and share your research!
But avoid …
Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Post Your Answer Discard
Not the answer you're looking for? Browse other questions tagged ssh display java xorg or ask your own question.
How do I fix a “cannot open display” error when opening an X program after ssh'ing with X11 forwarding enabled?
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.11.9.40693