Reputation: 11
I'm trying to run this program remotely via SSH, but since it has a GUI, I get the error: "Could not connect to any X display."
I don't need the GUI, since I made some adaptions and want to experiment with it. I'm very new to programming, especially in C++.
So far, I tried to solve the problem, by removing/commenting the lines related to the uvcvideoproducer in the main.cpp and compiling it again, but it's still looking for a display and doesn't start via SSH.
When I entered the command "export DISPLAY=:0" in the command line first, then trying to run the programm, I get the output: "No protocol specified qt.qpa.screen: QXcbConnection: Could not connect to display :0 Could not connect to any X display."
I really don't know where to continue from here in order to solve the issue I'm having.
Thanks a lot, in advance for any help! It's very appreciated!
Upvotes: 0
Views: 208
Reputation: 11
Thanks for your responses!
The thing about ssh -X is, my colleague said, it's sometimes not even working between different distributions, and I'm even using Windows to connect to Ubuntu Server on a Raspberry Pi. So sorry for not adding this important information into my original post.
I actually solved my problem by using the Xvfb library in order to simulate a display.
The only things I had to do are first installing it:
sudo apt-get install xvfb
And then run the program via the xvfb command:
xvfb-run -a --server-args='-screen 0, 160x120x16' ./GetThermal
I could also use a simulated display in the size of 1024x768x16 and probably many more formats, I just didn't notice any performance difference, when I was running it.
Upvotes: 1