Raspberry and QT: application not visible on VNC
-
Hello,
I'm implementing a QT application and I'm at good point. I figured out only now that using a VNC the application is not visible and searching on the web I found the possible cause but I don't know how to solve.Basically it seems I developed an application based on QT5 and by default it uses OpenGLES ( platform=eglfs ).
This should mean that the visualization is shown on the monitor directly without passing through "display 0" as standard app.The solution seems start the application with "-platform xcb".
Here I'm lost.. where to specify this argument? I tried in run configuration but it doesn't work, the application wouldn't start.
Can someone clarify to me this this option?
My visual application still compatible or in order to use this kind of "platform" I need to create a project with different type?Here the best info I found related to this topic: https://www.raspberrypi.org/forums/viewtopic.php?t=162050
Thanks
Bye
Andrea -
Hello,
I'm implementing a QT application and I'm at good point. I figured out only now that using a VNC the application is not visible and searching on the web I found the possible cause but I don't know how to solve.Basically it seems I developed an application based on QT5 and by default it uses OpenGLES ( platform=eglfs ).
This should mean that the visualization is shown on the monitor directly without passing through "display 0" as standard app.The solution seems start the application with "-platform xcb".
Here I'm lost.. where to specify this argument? I tried in run configuration but it doesn't work, the application wouldn't start.
Can someone clarify to me this this option?
My visual application still compatible or in order to use this kind of "platform" I need to create a project with different type?Here the best info I found related to this topic: https://www.raspberrypi.org/forums/viewtopic.php?t=162050
Thanks
Bye
Andrea@Andreagugu said in Raspberry and QT: application not visible on VNC:
where to specify this argument?
pi@raspberrypi ~ $ /path/to/my/Qt/application -platform xcb
-
Thanks, but this reports:
this application failed to start because it could not find or load the qt platform plugin "xcb" in "".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.I searched how to install xcb without found it..
You know xcb? could be somehow the solution to my problem with vnc?
Just as additional info: I use a VM with ubuntu where I'm compiling and implementing the app, transferred with tool chain on the raspberry. All works, the app is shown on the phisical display, but not on vnc X11vnc.
Thanks -
Hello,
I'm implementing a QT application and I'm at good point. I figured out only now that using a VNC the application is not visible and searching on the web I found the possible cause but I don't know how to solve.Basically it seems I developed an application based on QT5 and by default it uses OpenGLES ( platform=eglfs ).
This should mean that the visualization is shown on the monitor directly without passing through "display 0" as standard app.The solution seems start the application with "-platform xcb".
Here I'm lost.. where to specify this argument? I tried in run configuration but it doesn't work, the application wouldn't start.
Can someone clarify to me this this option?
My visual application still compatible or in order to use this kind of "platform" I need to create a project with different type?Here the best info I found related to this topic: https://www.raspberrypi.org/forums/viewtopic.php?t=162050
Thanks
Bye
Andrea@Andreagugu said in Raspberry and QT: application not visible on VNC:
I developed an application based on QT5 and by default it uses OpenGLES
Are you cross-compiling your Qt app?
if so, could you describe what config options you used to build Qt for RPi? -

You mean this?
Just to make it clear.. the tool chain is working fine, I can run the application and also debug.The problem is only that the visualization is shown "full screen" visible only in the phisical display but not on VNC.
-

You mean this?
Just to make it clear.. the tool chain is working fine, I can run the application and also debug.The problem is only that the visualization is shown "full screen" visible only in the phisical display but not on VNC.
@Andreagugu said in Raspberry and QT: application not visible on VNC:
You mean this?
No, I mean the file config.opt from the folder where you cross-compiled Qt framework.The problem is only that the visualization is shown "full screen" visible only in the phisical display but not on VNC.
Yes, because I suspect you didn't build Qt with support for xcb
-
ah, ok.. for sure you are right.. but I don't have an idea how to build with this option.
First of all.. makes sense to check if xcb is correctly installed?Again.. the issue is more on Ubuntu setup or raspberry?
I did some test using installed template like linuxfb ecc.. and in this case it works, means the application starts but in this specific case the result is really strange: the visualization seems mixed with desktop.. moving the mouse pointer in some areas the display shows desktop, and sometime the HMI... really strange! Using this plugin the VNC shows exaclty the same!! so it seems the right direction.
I'm the opinion that installing xcb on raspberry, allows me to lauch with -platform xcb and maybe it works as expected.but where to find the plugin?
-
ah, ok.. for sure you are right.. but I don't have an idea how to build with this option.
First of all.. makes sense to check if xcb is correctly installed?Again.. the issue is more on Ubuntu setup or raspberry?
I did some test using installed template like linuxfb ecc.. and in this case it works, means the application starts but in this specific case the result is really strange: the visualization seems mixed with desktop.. moving the mouse pointer in some areas the display shows desktop, and sometime the HMI... really strange! Using this plugin the VNC shows exaclty the same!! so it seems the right direction.
I'm the opinion that installing xcb on raspberry, allows me to lauch with -platform xcb and maybe it works as expected.but where to find the plugin?
@Andreagugu If you run configure (from Qt source code tree) with -v parameter you will see whether xcb support is activated and if not what is missing.
-
Hi, I added "-v" as run argument. But I don't understand how this could show if the xcb support is missing.
I mean, I'm not using or calling nothing that uses xcb.. Only if I add "-platform xcb" I'm specifying that.So I tried to add both: -v -platform xcb
but the result is the same, the application crashes at boot and in the output I can see this:
Can someone explain me how to install xcb that is obviously missing? Should be installed in the target (RPi) or in the developemnt VM (Ubuntu)?
-
Hi, I added "-v" as run argument. But I don't understand how this could show if the xcb support is missing.
I mean, I'm not using or calling nothing that uses xcb.. Only if I add "-platform xcb" I'm specifying that.So I tried to add both: -v -platform xcb
but the result is the same, the application crashes at boot and in the output I can see this:
Can someone explain me how to install xcb that is obviously missing? Should be installed in the target (RPi) or in the developemnt VM (Ubuntu)?
@Andreagugu I was talking about adding -v to configure command you can find in Qt source code...
-
Not sure to understand what you mean sorry. I'm not an expert of QT..
@jsulm said in Raspberry and QT: application not visible on VNC:
adding -v to configure command you can find in Qt source code...
for me this tell me nothing.
I tried to find the file "libqxcb.so" and I placed it into plugins/platforms/ folder and it is recognized somehow because calling the app with argument "-platform xcb" still not working but xcb is into the list.. maybe copy&paste doesn't mean correctly installed.
Any help?
-
Not sure to understand what you mean sorry. I'm not an expert of QT..
@jsulm said in Raspberry and QT: application not visible on VNC:
adding -v to configure command you can find in Qt source code...
for me this tell me nothing.
I tried to find the file "libqxcb.so" and I placed it into plugins/platforms/ folder and it is recognized somehow because calling the app with argument "-platform xcb" still not working but xcb is into the list.. maybe copy&paste doesn't mean correctly installed.
Any help?
@Andreagugu said in Raspberry and QT: application not visible on VNC:
adding -v to configure command you can find in Qt source code...
Did you cross-compile Qt yourself?
If so, at some point you run command like this on your host PC:./configure -release -opengl es2 -device ...
in that case, @jsulm is asking you to run the command below and provide its output:
./configure -v
you can also get same information by looking at file config.opt in that same folder where you configured/built Qt framework
-
I'm not cross-compile Qt by myself.
I installed Qt on Ubuntu, I configured device inside options.. when I run the application I simply press on Debug button!
What do you mean with cross-compile by yourself?!I found something like you speak about inside the folder "device" in the installation path:

this is something that can help?
I try to ask it again: if I need xcb plugin platform, there is a way to install? all tentative was not successful.
the problem is in the Ubuntu installation or raspberry in your opinion? at which level this xcb should work?in my understanding, based on the fact that having a program build I should add argument "-platform xcb" and should work
means simply that on raspberry the plugin is missing, right? -
I'm not cross-compile Qt by myself.
I installed Qt on Ubuntu, I configured device inside options.. when I run the application I simply press on Debug button!
What do you mean with cross-compile by yourself?!I found something like you speak about inside the folder "device" in the installation path:

this is something that can help?
I try to ask it again: if I need xcb plugin platform, there is a way to install? all tentative was not successful.
the problem is in the Ubuntu installation or raspberry in your opinion? at which level this xcb should work?in my understanding, based on the fact that having a program build I should add argument "-platform xcb" and should work
means simply that on raspberry the plugin is missing, right?@Andreagugu Looks like we need to clarify some things:
- Do you build your app on your Raspberry Pi or on a host machine?
- How did you install Qt for your Raspberry Pi?
-
I build the application in the host machine (Ubuntu).
I followed some guide on the web.. after some tentatives :-P I found the way to make it working.
Basically I configure the device as remove device linux with his IP address, etc.. and then Qt could build and deploy the application built. I could also debug, breakpoints, etc.. it works quite well.

-
I build the application in the host machine (Ubuntu).
I followed some guide on the web.. after some tentatives :-P I found the way to make it working.
Basically I configure the device as remove device linux with his IP address, etc.. and then Qt could build and deploy the application built. I could also debug, breakpoints, etc.. it works quite well.

@Andreagugu Glad to hear this!
Please mark your thread as solved then. -
Sorry but.. what I solved??
From the first post I wrote that the tool chain is working.
Is not this the problem! I can run the application shown on the physical display HDMI but not on VNC as I need finally.The problem that I still having is that the visualization is shown as framebuffers and I'm not able to show my application in
the standard display :0 !!The question is: developing an application with QT5 on Ubuntu deployed on Raspberry, could show the result in the display :0?
If yes... good, please explain how because searching on the web I'm not able to find the way. -
Sorry but.. what I solved??
From the first post I wrote that the tool chain is working.
Is not this the problem! I can run the application shown on the physical display HDMI but not on VNC as I need finally.The problem that I still having is that the visualization is shown as framebuffers and I'm not able to show my application in
the standard display :0 !!The question is: developing an application with QT5 on Ubuntu deployed on Raspberry, could show the result in the display :0?
If yes... good, please explain how because searching on the web I'm not able to find the way.@Andreagugu "I'm not cross-compile Qt by myself." - then how do you build your app on Ubuntu host machine for raspberry Pi?!
You need a cross compiled Qt to do so.
http://wiki.qt.io/Raspberry_Pi_Beginners_Guide -
I build the application on Qt installed on Ubuntu. So I write the code.. I click on "Build button" and then I press "Run" or "Start debugging F5" and magically the application on Raspberry starts.
As already wrote many times the tool chain is working. From my side is not clear what does it mean "....by myself" it seems I have to call some script or launch commands manually.. by myself...
What do it mean for you?
Sorry but I installed the tool chain for the first time it was easy to configure following most probably the guide you linked, I don't remember which one, you can find many on the web.But again the tool chain is working!! Have you understood what is the problem? Then we can try to find a solution.
When I wrote "no, I'm not cross-compiling by myself" is because for example the command "./configure bla bla bla..." I haven't to call, simply F5.. RUN.Maybe is more easy if you answer my question first.. if the answer is no we have done.