No X11 DISPLAY variable was set, but this program performed an operation which requires it











up vote
0
down vote

favorite












I am trying to install a program on RedHAt7 using ssh / connecting to server



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.<init>(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.<clinit>(Configuration.java:111)

... 3 more


how to fix X11 Display?










share|improve this question




























    up vote
    0
    down vote

    favorite












    I am trying to install a program on RedHAt7 using ssh / connecting to server



    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.<init>(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.<clinit>(Configuration.java:111)

    ... 3 more


    how to fix X11 Display?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to install a program on RedHAt7 using ssh / connecting to server



      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.<init>(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.<clinit>(Configuration.java:111)

      ... 3 more


      how to fix X11 Display?










      share|improve this question















      I am trying to install a program on RedHAt7 using ssh / connecting to server



      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.<init>(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.<clinit>(Configuration.java:111)

      ... 3 more


      how to fix X11 Display?







      ssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 29 '17 at 12:06









      DavidPostill

      102k25220255




      102k25220255










      asked Jun 29 '17 at 7:48









      mmenon

      1113




      1113






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          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:




          1. Ensure xauth is installed on target

          2. In /etc/sshd_config set X11Forwarding yes

          3. Run ssh with -vv to check what is the problem, if any






          share|improve this answer























          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
            – mmenon
            Jun 29 '17 at 10:13










          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
            – mmenon
            Jun 29 '17 at 10:14










          • both tried X and Y
            – mmenon
            Jun 29 '17 at 10:14










          • ssh -X -1 not works
            – mmenon
            Jun 29 '17 at 10:16











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1223939%2fno-x11-display-variable-was-set-but-this-program-performed-an-operation-which-r%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          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:




          1. Ensure xauth is installed on target

          2. In /etc/sshd_config set X11Forwarding yes

          3. Run ssh with -vv to check what is the problem, if any






          share|improve this answer























          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
            – mmenon
            Jun 29 '17 at 10:13










          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
            – mmenon
            Jun 29 '17 at 10:14










          • both tried X and Y
            – mmenon
            Jun 29 '17 at 10:14










          • ssh -X -1 not works
            – mmenon
            Jun 29 '17 at 10:16















          up vote
          0
          down vote













          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:




          1. Ensure xauth is installed on target

          2. In /etc/sshd_config set X11Forwarding yes

          3. Run ssh with -vv to check what is the problem, if any






          share|improve this answer























          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
            – mmenon
            Jun 29 '17 at 10:13










          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
            – mmenon
            Jun 29 '17 at 10:14










          • both tried X and Y
            – mmenon
            Jun 29 '17 at 10:14










          • ssh -X -1 not works
            – mmenon
            Jun 29 '17 at 10:16













          up vote
          0
          down vote










          up vote
          0
          down vote









          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:




          1. Ensure xauth is installed on target

          2. In /etc/sshd_config set X11Forwarding yes

          3. Run ssh with -vv to check what is the problem, if any






          share|improve this answer














          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:




          1. Ensure xauth is installed on target

          2. In /etc/sshd_config set X11Forwarding yes

          3. Run ssh with -vv to check what is the problem, if any







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 30 '17 at 13:43

























          answered Jun 29 '17 at 8:25









          tharrrk

          13




          13












          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
            – mmenon
            Jun 29 '17 at 10:13










          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
            – mmenon
            Jun 29 '17 at 10:14










          • both tried X and Y
            – mmenon
            Jun 29 '17 at 10:14










          • ssh -X -1 not works
            – mmenon
            Jun 29 '17 at 10:16


















          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
            – mmenon
            Jun 29 '17 at 10:13










          • ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
            – mmenon
            Jun 29 '17 at 10:14










          • both tried X and Y
            – mmenon
            Jun 29 '17 at 10:14










          • ssh -X -1 not works
            – mmenon
            Jun 29 '17 at 10:16
















          ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
          – mmenon
          Jun 29 '17 at 10:13




          ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -Y root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0. why happened like this
          – mmenon
          Jun 29 '17 at 10:13












          ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
          – mmenon
          Jun 29 '17 at 10:14




          ubuntu@ubuntu-ThinkCentre-M58p ~ $ ssh -X root@server ip address... root server ip...'s password: X11 forwarding request failed on channel 0.
          – mmenon
          Jun 29 '17 at 10:14












          both tried X and Y
          – mmenon
          Jun 29 '17 at 10:14




          both tried X and Y
          – mmenon
          Jun 29 '17 at 10:14












          ssh -X -1 not works
          – mmenon
          Jun 29 '17 at 10:16




          ssh -X -1 not works
          – mmenon
          Jun 29 '17 at 10:16


















          draft saved

          draft discarded




















































          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


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




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1223939%2fno-x11-display-variable-was-set-but-this-program-performed-an-operation-which-r%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix