Search Unity

Bug QXcbConnection: Could not connect to display

Discussion in 'Linux Editor' started by JonyderKiller, Sep 6, 2015.

  1. JonyderKiller

    JonyderKiller

    Joined:
    Sep 1, 2012
    Posts:
    10
    I am trying to setup Unity on a ubuntu server 14.04 the installation itself didn't give me any errors but i can't run Unity with "/opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -serial mySerial".
    First i got the following error:
    Aborted
    This application failed to start because it could not find or load the Qt platform plugin "xcb".
    Available platform plugins are: xcb.
    Reinstalling the application may fix this problem.


    I was able to fix this by installing the xcb package with "apt-get install xcb" but now I get the following error:
    Aborted
    QXcbConnection: Could not connect to display


    I think this is odd because http://docs.unity3d.com/Manual/CommandLineArguments.html states that the "-nographics" option prevents Unity from initializing any graphics devices. I would love to get this working so i can setup a continuous integration on my ubuntu server. Thanks in advance for any help/feedback.
     
  2. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    131
  3. JonyderKiller

    JonyderKiller

    Joined:
    Sep 1, 2012
    Posts:
    10
    I downloaded the deb package and installed with "dpkg -i unityXXX.deb" after that i ran "apt-get -f install" to fetch all the required dependencies.

    I tried with the new version which was released today it came with an additional dependency on "libpq5" and now the "QXcbConnection: Could not connect to display" error message is gone but if i run "/opt/Unity/Editor/Unity -quit -batchmode -nographics -createProject TestProject" i still get an "Aborted" message.

    I also tried to install the Qt Libraries with "apt-get install qt5-default" which added a lot of new packages but still unity just quits with message "Aborted" and there is no Editor.log file generated.
    I noticed that when i run the above unity command without the "-nographics" i dont get the "Aborted" message however if i run it with the "-nographics" option i get a directory called TestProject and within a Temp directory, this is not the case if i run it without the "-nographics". So it seems like unity tries to run but aborts for an unknown reason. Maybe i am still missing some packages, but i am not sure which ones.
     
  4. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    131
  5. JonyderKiller

    JonyderKiller

    Joined:
    Sep 1, 2012
    Posts:
    10
    Using xvfb solves the issues, also thank you for linking the jenkins plugin made it really easy to setup for me. Your Unity plugin also runs prefect. Thank you for all your help and effort really appreciate it.
     
  6. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    945
    That's particularly odd, given that Unity doesn't use Qt. The crash reporter does, however - I guess it was crashing (for lack of X session), then failing to launch the bug reporter for lack of qt-xcb?

    nographics mode isn't 100% X-free yet in the editor - it's a TODO
     
  7. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    131
    @JonyderKiller I conclude from this that I can release a new version with unity support. Right ?
     
  8. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    131
    I released v1.2. Enjoy

    Thanks for your help testing !
     
  9. JonyderKiller

    JonyderKiller

    Joined:
    Sep 1, 2012
    Posts:
    10
    @Tak good to know that you guys are working on it, but for now i have a working solution so no hurry from my side.

    @jerome.lacoste I have to thank you for your quick addition to the plugin and helping me figure out a solution for this problem.