Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. OpenSuse "cannot connect X Server" error
QtWS25 Last Chance

OpenSuse "cannot connect X Server" error

Scheduled Pinned Locked Moved Mobile and Embedded
22 Posts 4 Posters 14.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    umtkyck
    wrote on last edited by
    #3

    Hi SGaist,

    thanks for you answer but actually I tried this and doesnt work. I installed qt everywhere 4.8.6, In usr/local/Trolltech/4.8.6 file. I set chain to QtCreator and chosed generic linux device and created device with root@IP. How can I understand program is running on X11 or FrameBuffer.

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #4

      From what I remember of opensuse JEOS (but check on internet and documentation of opensuse), the JEOS is a very minimal version of linux and it does not come with any graphical interface.
      If I'm right, you cannot run any GUI application (Qt or not Qt-based).

      So, a silly question: Do you see any graphic interface on the Atom device, or you just see the terminal ??

      1 Reply Last reply
      0
      • U Offline
        U Offline
        umtkyck
        wrote on last edited by
        #5

        I choosed it because of its minimal linux, yeah there is no graphical Interface only console but it doesnt mean we can not work Qt Qui apps.I tried to install qt toolchain.This problem should be occured else.

        1 Reply Last reply
        0
        • GianlucaG Offline
          GianlucaG Offline
          Gianluca
          wrote on last edited by
          #6

          I'm sorry to get you bad news ... but if there is no graphical interface you cannot run graphical applications !!
          Think about that: how can be possible to show a user interface if there is no graphical system underlying ??

          No installed graphical interface (X-Server) IMPLY No possibility to run GUI applications !!!

          You can only run app without user interfaces.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            umtkyck
            wrote on last edited by
            #7

            I understood what you mean but QWS is kind of windowing sytem and I used it on ARM Board and there is no GUI on it but qt provides a QWS and framebuffer , app works on it.

            1 Reply Last reply
            0
            • U Offline
              U Offline
              umtkyck
              wrote on last edited by
              #8

              I tried to Remote Deploy and it says:
              "testGUI: cannot connect to X server :0.0"

              How can I solve this problem , I searched net but I couldnt solve problem.

              1 Reply Last reply
              0
              • GianlucaG Offline
                GianlucaG Offline
                Gianluca
                wrote on last edited by
                #9

                Again ... if you don't install a X11 system on your linux box, you'll never solve this problem.
                QWS is not a windowing system .. it's a particular modality on which Qt Gui application are executed, but again, without any window systems underlying there is no hope to run a GUI application.
                So, get to the opensuse documentation, and install the X11 system or something else (like Wayland).

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  s.frings74
                  wrote on last edited by
                  #10

                  To access a remote display, you need to set an environment variable. In you case, the display ":0.0" refers to a local X-Server.

                  For example, you connect a Linux computer with a running X-Server to the network, then on that computer execute the command "sudo xhost +". This allows other computers to access your display.

                  Then on the embedded system open a shell and enter "export DISPLAY=192.168.1.2:0.0" before you start the program in the same shell. Of yourse, you have to enter the IP-Address of the Linux computers that provides the X-Server.

                  1 Reply Last reply
                  0
                  • U Offline
                    U Offline
                    umtkyck
                    wrote on last edited by
                    #11

                    I wrote "sudo xhost +" on ubuntu 14.04 which is my development machine then “export DISPLAY=192.168.14.129:0.0” on my opensuse JEOS Intel Atom machine but I doesnt work. On ubuntu qtcreator it returns :
                    "testGUI: cannot connect to X server :0.0
                    Application finished with exit code 1."

                    When I working with Arm Board there is green screen is coming while Qt apps are working , why does it not coming now? On Arm I was using minimal linux and it was not better than OpenSuse I can not understand now. Do I install any package about qt, qtembedded or Gtk or QWS ?

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      umtkyck
                      wrote on last edited by
                      #12

                      I wrote simple console application It is working perfect but GUIs doesnt work.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        Then the question here is do you have a frame buffer device ? Something like /dev/fb0 ?

                        @ Gianluca qws was designed to run on system without X. The minimal requirement was a functional linux frame buffer. There were several plugins like e.g. DirectFB. So it might be used here if the minimal conditions are present.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • U Offline
                          U Offline
                          umtkyck
                          wrote on last edited by
                          #14

                          Yeah SGaist I can see /dev/fb0.
                          is this means I have frame buffer , how can I run it

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            Build Qt with the -embedded option like you did for ARM but don't cross-compile it. Then use that version of Qt to build your program and copy it on your target so that it will also be used there

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • U Offline
                              U Offline
                              umtkyck
                              wrote on last edited by
                              #16

                              I realized something that while I can configuring qt elsewhere 4.8.6 I only used "./configure".But Actually I didnt add -embedded prefix to configuration and maybe gui codes are tying to connect X server instead of Virtual Frame Buffer.I will reconfigure qt and then I will turn.
                              thanks.

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #17

                                Don't forget to clean before you call configure again, you can also build several plugins at once e.g. the VFB and the linux frame buffer/DirectFB/what you need. It will avoid you to build them again later when you want to run your application on your target.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • U Offline
                                  U Offline
                                  umtkyck
                                  wrote on last edited by
                                  #18

                                  Hi,
                                  SGAist , Which one do you suggest ? I thought to configure like "./configure -embedded i386".

                                  1 Reply Last reply
                                  0
                                  • U Offline
                                    U Offline
                                    umtkyck
                                    wrote on last edited by
                                    #19

                                    I found something on net for "cannot connect X server "in below,

                                    Solution:

                                    1. Place the correct QT libraries on the embedded platform and specify the path using LD_LIBRARY_PATH (I havent tried this)
                                    2. use -static switch in the QT library ./configure. This will pretent the executable from looking for the QT libraries. (I tried this and it works). However this will still ask for /lib/fonts, which i had to copy from the host environment.

                                    I tried first one and problem still occurs.I couldnt understand second one how can I add "-static"?

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #20

                                      It will only work when you will be using an embedded version of Qt.

                                      It will depend on your target OS either x86 or x86_64

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • U Offline
                                        U Offline
                                        umtkyck
                                        wrote on last edited by
                                        #21

                                        Hi,
                                        Before I try -embedded configure :
                                        If I write "xinit ./calculator -qws" it works but when I try "./calculator -qws" it doesnt work cannot connect X server.
                                        After -mbedded configure
                                        "xinit ./calculator -qws" doesnt work too.

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #22

                                          As long as you are working on your desktop use the standard Qt. Once you are ready to test it on your target, compile your application with the embedded version and start that version on your board, provided you also put the embedded Qt libs in the right place on the target

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved