QXcbConnection: Could not connect to display
-
Hi,
I am trying to run my Qt program (named ROBOCRT) in ubuntu 14.04 through 'init.d' script. The program runs fine if I launch it from terminal. However, when I launch it through the 'init.d' script using 'sudo service ROBOCRT start', I get the following error message 'QXcbConnection: Could not connect to display' in a log file. I am working with Qt 5.3. Any hint how to resolve this problem.
Kind regards
chjatala -
Thx.
At the moment I am running the app after user login, not during system bootup. The app runs without error in the terminal.
The app is based on 'Qt Widgets App', however, I disbaled the window display by commenting out 'w.show();' line in 'main.cpp'.
-
@chjatala can you please ellaborate your answer?thx