Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error when launching rqt
QtWS25 Last Chance

Error when launching rqt

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 19.0k 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.
  • J Offline
    J Offline
    John.M T
    wrote on last edited by
    #1

    hi guys,
    I am running ubuntu20.04 server with ROS2 foxy desktop on raspberry pi 4.
    Using window10 putty SSH accessing raspberry pi 4 and login to its ubuntu.
    When launching "rqt", the following error showed up:


    could not connect to display
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.


    Please advise.
    Thanks

    JonBJ jsulmJ 2 Replies Last reply
    0
    • J John.M T

      hi guys,
      I am running ubuntu20.04 server with ROS2 foxy desktop on raspberry pi 4.
      Using window10 putty SSH accessing raspberry pi 4 and login to its ubuntu.
      When launching "rqt", the following error showed up:


      could not connect to display
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

      Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.


      Please advise.
      Thanks

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @John-M-T
      I don't know what "rqt" is. But as you can when so many people ask the same question as you with the error message you show, you should set an environment variable QT_DEBUG_PLUGINS=1 and then look at the end of detailed diagnostic messages you will get.

      J 1 Reply Last reply
      2
      • JonBJ JonB

        @John-M-T
        I don't know what "rqt" is. But as you can when so many people ask the same question as you with the error message you show, you should set an environment variable QT_DEBUG_PLUGINS=1 and then look at the end of detailed diagnostic messages you will get.

        J Offline
        J Offline
        John.M T
        wrote on last edited by
        #3

        @JonB Thanks for your reply. Have used "export qt_debug_plugins=1", but no other error messages except those I mentioned above. :(

        Pl45m4P 1 Reply Last reply
        0
        • J John.M T

          @JonB Thanks for your reply. Have used "export qt_debug_plugins=1", but no other error messages except those I mentioned above. :(

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @John-M-T

          You are not coding something with Qt, aren't you?! You've started a program and this message showed up?!

          rqt is RosQt or something like that?

          Have you used capital letters for QT_DEBUG_PLUGINS?

          This error is very common and could come from different sources.
          Maybe this helps

          • https://askubuntu.com/questions/308128/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without

          Like @JonB also said, you should see at least some more lines when you start the program that causes this error in your console.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          J 1 Reply Last reply
          0
          • J John.M T

            hi guys,
            I am running ubuntu20.04 server with ROS2 foxy desktop on raspberry pi 4.
            Using window10 putty SSH accessing raspberry pi 4 and login to its ubuntu.
            When launching "rqt", the following error showed up:


            could not connect to display
            This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

            Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.


            Please advise.
            Thanks

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @John-M-T You're trying to start a GUI application through SSH. This is not going to work like this.
            You need to use VNC for example to forward the graphical output to your Windows machine.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            J 1 Reply Last reply
            1
            • Pl45m4P Pl45m4

              @John-M-T

              You are not coding something with Qt, aren't you?! You've started a program and this message showed up?!

              rqt is RosQt or something like that?

              Have you used capital letters for QT_DEBUG_PLUGINS?

              This error is very common and could come from different sources.
              Maybe this helps

              • https://askubuntu.com/questions/308128/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without

              Like @JonB also said, you should see at least some more lines when you start the program that causes this error in your console.

              J Offline
              J Offline
              John.M T
              wrote on last edited by
              #6

              @Pl45m4 Thanks for your reply. You are right, I am launching rqt for ROS application development. I hope Qt experts here can help to give some hints on what needs to pay attention to. Yes, i used capital letters for QT_DEBUG_PLUGINS. Meanwhile, I also looking around for solutions. Thanks for the link provided. Appreciate that.

              JonBJ 1 Reply Last reply
              0
              • jsulmJ jsulm

                @John-M-T You're trying to start a GUI application through SSH. This is not going to work like this.
                You need to use VNC for example to forward the graphical output to your Windows machine.

                J Offline
                J Offline
                John.M T
                wrote on last edited by
                #7

                @jsulm hi there, thanks for your reply. Yes, you are right. I am trying to launch a GUI application via SSH. May be the remote x-client was not launched and that caused the "could not connect to display" error. Thanks for the prompt ... will look into that direction for solution. Appreciate that.

                1 Reply Last reply
                0
                • J John.M T

                  @Pl45m4 Thanks for your reply. You are right, I am launching rqt for ROS application development. I hope Qt experts here can help to give some hints on what needs to pay attention to. Yes, i used capital letters for QT_DEBUG_PLUGINS. Meanwhile, I also looking around for solutions. Thanks for the link provided. Appreciate that.

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @John-M-T
                  The QT_DEBUG_PLUGINS variable needs to be in the environment of the running Qt program. My guess is your way is not passing that through to the final program running?

                  J 1 Reply Last reply
                  0
                  • JonBJ JonB

                    @John-M-T
                    The QT_DEBUG_PLUGINS variable needs to be in the environment of the running Qt program. My guess is your way is not passing that through to the final program running?

                    J Offline
                    J Offline
                    John.M T
                    wrote on last edited by
                    #9

                    @JonB , @jsulm , @Pl45m4 Thanks everyone. I managed to have the problem resolved based on your suggestion and advices.

                    1. "could not connect to display" error
                    Because the x-server was trying to connect the remote x-client. But the x-client was not launched. After launching VcXsrv, connection was established and the GUI app appeared on the remote PC (i.e. x-client side).

                    2. however, still have some error message
                    Although the connection was successful, x-server reported the following error:
                    libGL error: No matching fbConfigs or visuals found
                    libGL error: failed to load driver: swrast

                    Managed to find the solution posted at
                    https://itectec.com/ubuntu/ubuntu-win10-linux-subsystem-libgl-error-no-matching-fbconfigs-or-visuals-found-libgl-error-failed-to-load-driver-swrast/

                    All error messages are gone by now. Hope this post benefit those who are having the same problem as mine.

                    Thank you very much guys!

                    1 Reply Last reply
                    2

                    • Login

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