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. Qt non-interactive install in Docker file fails with QXcbConnection DISPLAY Error

Qt non-interactive install in Docker file fails with QXcbConnection DISPLAY Error

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 1.1k Views 3 Watching
  • 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.
  • A Offline
    A Offline
    anshah
    wrote on last edited by
    #1

    I have a docker file that is doing a Qt 5.8 non-interactive install and I'm getting the following error:

    Step 15/21 : ENV QT_VERSION_A=5.8
    ---> Using cache
    ---> 585508f8fb4e
    Step 16/21 : ENV QT_VERSION_B=5.8.0
    ---> Using cache
    ---> 32eb654acb19
    Step 17/21 : ENV QT_VERSION_SCRIPT=580
    ---> Using cache
    ---> 7be314d66824
    Step 18/21 : RUN wget https://download.qt.io/archive/qt/${QT_VERSION_A}/${QT_VERSION_B}/qt-opensource-linux-x64-${QT_VERSION_B}.run
    ---> Using cache
    ---> b16f68a4774e
    Step 19/21 : RUN chmod +x qt-opensource-linux-x64-${QT_VERSION_B}.run
    ---> Using cache
    ---> dcd41dd5c287
    Step 20/21 : COPY qt-noninteractive.qs /qt-noninteractive.qs
    ---> Using cache
    ---> 72c46b2abe23
    Step 21/21 : RUN ./qt-opensource-linux-x64-${QT_VERSION_B}.run --script qt-noninteractive.qs
    ---> Running in e75d96617513
    QXcbConnection: Could not connect to display
    Aborted (core dumped)

    I have tested this on a Ubuntu VM with a display and it works fine. Are there any workarounds?

    Thanks,

    Ankur

    Pablo J. RoginaP 1 Reply Last reply
    0
    • A anshah

      I have a docker file that is doing a Qt 5.8 non-interactive install and I'm getting the following error:

      Step 15/21 : ENV QT_VERSION_A=5.8
      ---> Using cache
      ---> 585508f8fb4e
      Step 16/21 : ENV QT_VERSION_B=5.8.0
      ---> Using cache
      ---> 32eb654acb19
      Step 17/21 : ENV QT_VERSION_SCRIPT=580
      ---> Using cache
      ---> 7be314d66824
      Step 18/21 : RUN wget https://download.qt.io/archive/qt/${QT_VERSION_A}/${QT_VERSION_B}/qt-opensource-linux-x64-${QT_VERSION_B}.run
      ---> Using cache
      ---> b16f68a4774e
      Step 19/21 : RUN chmod +x qt-opensource-linux-x64-${QT_VERSION_B}.run
      ---> Using cache
      ---> dcd41dd5c287
      Step 20/21 : COPY qt-noninteractive.qs /qt-noninteractive.qs
      ---> Using cache
      ---> 72c46b2abe23
      Step 21/21 : RUN ./qt-opensource-linux-x64-${QT_VERSION_B}.run --script qt-noninteractive.qs
      ---> Running in e75d96617513
      QXcbConnection: Could not connect to display
      Aborted (core dumped)

      I have tested this on a Ubuntu VM with a display and it works fine. Are there any workarounds?

      Thanks,

      Ankur

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @anshah said in Qt non-interactive install in Docker file fails with QXcbConnection DISPLAY Error:

      I have tested this on a Ubuntu VM with a display and it works fine. Are there any workarounds?

      What about making the Docker container start X before you run the Qt installation?

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

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

        Hi,

        You can try setting the backend to offscreen through the environment variables.

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

        A 1 Reply Last reply
        0
        • Pablo J. RoginaP Pablo J. Rogina

          @anshah said in Qt non-interactive install in Docker file fails with QXcbConnection DISPLAY Error:

          I have tested this on a Ubuntu VM with a display and it works fine. Are there any workarounds?

          What about making the Docker container start X before you run the Qt installation?

          A Offline
          A Offline
          anshah
          wrote on last edited by
          #4

          @Pablo-J.-Rogina What command can I put in the docker container to start X?

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            You can try setting the backend to offscreen through the environment variables.

            A Offline
            A Offline
            anshah
            wrote on last edited by
            #5

            @SGaist If you can give an example of how to set the backend to offscreen that would be great!

            mrjjM 1 Reply Last reply
            0
            • A anshah

              @SGaist If you can give an example of how to set the backend to offscreen that would be great!

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              From here
              https://www.ics.com/blog/qt-tips-and-tricks-part-1
              (section QPA Back Ends )
              i think you can set the environment variable QT_QPA_PLATFORM to offscreen

              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