Compiling on Fedora 10.
I have just started my first qt GUI application. I used all the default settings.
Its just a simple form. It builds OK without any errors. But when I try and run the application. I get the following message:
Starting /home/rob/projects/qt/test1/test1/test1...
No protocol specified
test1: cannot connect to X server :0.0
Thanks for any advice,
Also, if you'd like your X server to be able to receive connection over TCP, these days you must almost always explicitly enable this. To test whether you're server is allowing remote TCP connections try:
telnet 127.0.0.1 6000
If telnet is able to connect, then your X server is listening. If it can't, then neither will any remote X application and you need to enable remote TCP connections on your server.
Adding to above answers. I was in a similar situation while running tests for Code2Pdf at travis. I solved the problem using xvfb-run. Quoting from the manpage,
The script that I wrote was:
Running the above script helped me. You can see the failing build and passing build.
Hope it helps
The general causes for this are as follows:
DISPLAY not set in the environment.
Solution:
( This one doesn't appear to be the one at fault though, as its saying which X display its trying to connect to. Also, its not always 0.0, but most of the time it is )
Non-Authorised User trying to run the X Application
Solution ( as X owning user, ie: yourself )