Opening QT from remote desktop connection



  • Hello,
    I'm trying to access QT Creator on a XU4 Odroid through a remote desktop connection. Currently I'm using x11server, which is configured to autostart, and TightVNC Viewer on my Windows PC.

    When I establish the connection I can open most applications and execute terminal commands EXCEPT when trying to access QT Creator. When I try opening a .pro file with QT or type "sudo qtcreator" in terminal it does not work. I get no error messages, the command simply does not execute.

    Weirder still, if I simply connect an HDMI cable from the Odroid to a monitor and reboot, I can now access QT Creator as if there was no issue from my remote desktop connection. I'm wondering if anyone has had similar issues or knows what the solution could be.

    Thank you!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    By default Qt's use the xcb backend on Linux so it needs an active X session to show something.

    You might want to try the VNC backend (IIRC, since Qt 5.8)



  • By VNC backend do you mean the official QT Toolchain? Is there no way to initialize an XSession from a remote desktop connection or SSH?


  • Lifetime Qt Champion

    IIRC, ssh -X



  • @slooper If I understood correctly you want to have and run a Qt application on the Odroid but see the output (windows, widgets, UI) and control it (with keyboard and mouse) on a desktop machine. Yes, it's possible to do it with X11 and ssh. I don't know about VNC but you can install an X11 server on Windows, Xming is one possibility. The application on a remote machine then uses your local X11 server for input/output. Normal basic applications work, you probably don't want to stream video or other low level graphics that way anyways. For example different www browsers give mixed results. Unfortunately I haven't tried Qt Creator that way and I don't remember details about Xming and ssh setup and commands. But theoretically it should be possible :)

    Edit: see e.g. https://superuser.com/questions/99303/what-are-my-x-client-options-for-ms-windows



  • @SGaist I tried to SSH and use sudo startx and that bricked the device for a while, fixed it but not too keen to continue using terminal commands to initialize an X Session



  • @Eeli-K I'm looking to use a remote connection to access my desktop on a Odroid running Linux, in order to view the QT creator app to debug and run an application.

    I don't understand why I need a server on my Windows computer as the windows computer is the client ( the one connecting to the Odroid).

    If I understand correctly I should acccess my Odroid using SSH, then Xming would display the Odroid's destop. I'm not sure how it works but I'll look into it.



  • @slooper Ahh, so you run Qt Creator binary on Windows and want to interact with in from Odroid? In that case I didn't understand correctly and you will need VNC or something similar which lets you control your MS Windows desktop from a remote machine. On the other hand your post still makes me believe I understood correctly ("TightVNC Viewer on my Windows PC", " connect an HDMI cable from the Odroid to a monitor and reboot, I can now access QT Creator"). In that case our miscommunication may have been caused by the X11 terminology where X11 input/output part (comparable to a remote desktop viewer) is the server and the actual application which you want to use is a client. Normally a remote X11 client application runs on a server machine. Therefore, if you want to control an X11 Linux app from Windows you have to install an X11 server on Windows.

    (Edit: the subject of the given superuser.com thread is wrong, it should be "server" from X11 viewpoint).



  • @Eeli-K Update: I set up XMing on my desktop and configured it to run through SSH and an instance of xfce4 desktop and I still had the same issues I previously had with VNC. I executed the terminal command and had none of the expected startup terminal outputs and the program did not open. This is what my client desktop looked like
    0_1496241485334_Capture.PNG


  • Lifetime Qt Champion

    The upload feature is currently broken. See this thread on how to insert an image on this forum.



  • @slooper The problem may be in OpenGL which QML uses, or the way Qt or QML uses it. The same problem plagues at least some VNC clients. You can find tons of questions and answers by googling e.g. "qt x11 forwarding", "glx x11 remote", "qt creator vnc" and so on. I haven't found a solution. Some suggest Cygwin X11 works; some suggest installing an extra third-party package for cygwin; some suggest that TightVNC or TurboVNC or some other VNC works. Do some searches and hope you find some answer or an alternative.

    Maybe we can give alternative ways to reach your goal if you tell what you finally want to achieve - running Qt Creator on an embedded device hardly is anyone's ultimate goal per se.



  • VirtualGL, http://www.virtualgl.org/, may be a solution. It seems to be used together with TurboVNC. However, the documentation and everything related to VirtualGL seems to be very confusing and these modern SoC embedded systems aren't the main target. We don't even know for sure what the problem is with your Odroid connection, if it is OpenGL related at all. I tested X11 Windows servers connected only with a normal x86_64 desktop Linux machine and came to the conclusion that OpenGL rendering is the problem. So I don't know what is worth trying for you.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.