8 Replies Latest reply on Sep 16, 2010 2:47 PM by 807557

    xhost + :  unable to open display ":0.0", Please help

      Hello folks, I am running into problem with displaying X window on pc.
      When I run xhost +, am getting 'unable to opne display ":0.0"

      I was able to display window on another sun machine but not on the pc.
      I beleive problem starts with the xhost + which produces error.
      Can you recommend something.
        • 1. Re: xhost + :  unable to open display ":0.0", Please help
          what X server app are you using on the PC? Are you trying to tunnel over ssh?
          • 2. Re: xhost + :  unable to open display ":0.0", Please help
            this output from sun station
            • 3. Re: xhost + :  unable to open display ":0.0", Please help
              If you are trying to display an X window on a PC, then you need an X server on the PC- even if the application you are trying to run is executing on the sun server. PC's (presuming Windows 2000, XP or later) don't have an X server included. Sun and Linux bundled X windows clients and servers (and ssh clients and sshd servers) so they work a lot easier. X windows reverses what is normally considered a client and server.

              I find most X display things work better if you can tunnel the display back over SSH. Typically on a sun client machine you should "ssh -X sunserver", run the app on the sun server, and the X display would get redirected back to sun client. Otherwise you need to run xhost on the X server machine (i.e. the client machine you are on) and use "DISPLAY=" or "setenv DISPLAY" on the X client (i.e. the sun server) to redirect display.

              If you get Xming installed on your Windows PC, it includes ssh client functionality and a wizard that you can run on your PC get launch the X app on the sun server and tunnel it back. In theory, if the X server is running on the PC you should be able to set it accept X connections and then on the Sun server type "set DISPLAY=mypc:0.0;export DISPLAY" to redirect the X display- but that hasn't worked so well for me.

              Cygwin also includes an optional X server for Windows- however, you seems to need be an admin-equiv for that to work. But I think it includes an X-term app that handles "ssh -X" for X redirection.

              Attachmate (formery WRQ) has a commerical ssh/X package for Windows but I could never get X tunneling over SSH to work.
              • 4. Re: xhost + :  unable to open display ":0.0", Please help
                It's a lot of information. Let's do one by one. I have started sygwin server.
                I need to run an installation program on sun client which will display X window on pc.
                I can't even get xhost working with running xhost pointing to local client.
                I ran xhost + and get this message.
                What do you suggest to do?
                • 5. Re: xhost + :  unable to open display ":0.0", Please help
                  on my windows PC, I have
                  Start -> Programs -> Cygwin X- > XWin Server

                  I also have

                  Start -> Programs -> Cygwin- > rxvt (X-terminal, various implementations)

                  rxvt-native will run start w/o X server runnning but no X apps will work until X server is started.

                  You may have to rerun cygwin setup and customize the install.

                  So, from a cygwin X term window, optionally type "xhost +", then "ssh -X you@sunserver" and then start the app. If that doesn't work, try Xming and its script. If that doesn't work, grab a spare PC and put Solaris x86 or Linux on it.

                  PS - Check with a basic app X like xclock first. Gnome apps (e.g. gedit) may add some additional security may still have some issues.
                  • 6. Re: xhost + :  unable to open display ":0.0", Please help
                    Thank you so much for respond.
                    Actually, I got it resolved.
                    Here is what I did:
                    Started Cygwin X server
                    Ran ssh -X user@servername
                    xhost + was in .profile

                    That's what disabled security access. Then I was able to run X window on pc server.
                    For record: Xming never worked. I wonder if it worked for anybody else.
                    • 7. Re: xhost + :  unable to open display ":0.0", Please help
                      You shouldn't use xhost +, it's not secure.
                      The whole point of using ssh & X-tunneling is to provide a secure mechanism for X!

                      Get rid of the xhost + stuff, and yes I use xming. Start xming.

                      What I actually do is use Putty go into the ssh settings, enable X11 forwarding and put localhost:0 as the Xdisplay location. Save it. Open the Putty Session and then run xclock &

                      Should work fine.
                      • 8. Re: xhost + :  unable to open display ":0.0", Please help
                        I did everything you said still no luck? Do we need to create any Xauth file ?