Home > OS >  Qt5: QXcbConnection: Could not connect to the display Aborted (core dumped)
Qt5: QXcbConnection: Could not connect to the display Aborted (core dumped)

Time:09-24

Masters, I am doing the Linux Qt development is encountered a problem: QXcbConnection: Could not connect to the display
Aborted (core dumped)

This error, which master can be solved?

CodePudding user response:

Don't know the building Lord did solve the same problem

CodePudding user response:

I also met the same problem what I use is qt5.6 your qt application on not install qt - SDK ubuntu system met the same error message
The building Lord solved please give the solution

CodePudding user response:

Finally solved my question is: I don't have any problem, qt application and package because when I test using the way of remote login to the test machine (bare-metal ubuntu environment) to run the program, so no open the -x option (that is, the remote graphic display),
SSH -x 172.16.160.196 (target machine IP) - MMM l (username)
Enter a password to enter after
Export DISPLAY=192.168.17.15:0.0 (0.0) own machine IP with

CodePudding user response:

Export DISPLAY=: 0.0
When I was in the CTRL + Alt + f1 test framebuffer also met this, when configured with the DISPLAY is ok, you can have a try, simple and quick

CodePudding user response:

reference 4 floor flfihpv259 response:
export DISPLAY=: 0.0
When I was in the CTRL + Alt + f1 test framebuffer also met this, it is ok to configure the DISPLAY under at that time, you can have a try, simple and fast


Set up the same error

CodePudding user response:

The effective solution is to:

First of all,

Vim. ~/bashrc
Then add

Export QT_QPA_PLATFORM='offscreen'
Immediate effect

The source ~/. Bashrc
So you can amount



After every change. Bashrc, use the source ~/. Bashrc (or. ~/. Bashrc)

Immediately load the modified Settings, into law,

Usually in. Following file explicitly call. Landed in Linux boot bash bashrc, will first

To read ~/. The following files, so ~/. Bashrc would be enforced, set your personalized

Also will take effect,

Reference:

QXcbConnection: Could not connect to the display
  • Related