Is it posible to compile a Client X Qt app to run in Window?

  • Hello everybody.

    I have a Qt application target for Linux but is executed remotely, with ssh -X.
    Now, the target OS is Windows.

    Is it posible recompile app for Windows target but display on a remote X Server.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    When using ssh you are usually executing the application on the remote machine with forwarding the X session back to the caller machine.

    So you don't need to build your application for Windows. However you need to have an X server on your Windows machine like xming.

  • Yes. But remote is a Windows Machine.
    I explain myself better.
    If I compile a Qt application on a Windows machine (Qt for Windows) I get a Qt Windows Native Application.
    If I compile the same source code on a Linux machine, I get a Qt Linux Native (usually client X) application.
    The question is :

    is it posible generate a Qt Windows Native Client X Application?

    So, when I will login from my Local machine (usually Linux) to the Remote Windows machine with ssh -X and execute the application (on Windows remote machine), the application can show the display on my local X Server (Linux) machine)

    Thanks in advanced.

  • Qt Champions 2017

    Since there is no default xserver on windows, i dont think its possible.
    without some new form of QPA
    (that knows the actual xserver you would be using)

    With a windows server, its possible to serve one application to a remote desktop

  • @mrjj Thanks for the reply.

    Yes, I agree that qpa can be a solution but it sound that it should be done yet.

    From Xming X server you can execute X clients on Windows and show the display on Windows or Linux. I suppose that it is posible build a X client with MinGW-w64

    If this is true, why we can't build a Qt Windows as X client Application ? It sound that should be possible, but I don't know how.

    Best regards.

  • Qt Champions 2017

    Yes the reverse is pretty easy.
    I use
    It can even run linux executable in WSL (Windows Subsystem for Linux) meaning you can run an native linux app on windows.
    But I have not seen any SDK or x server client libs that would allow to run and forward GDI windows apps.

    We simply miss the a windows version of Xlib to link to.
    Im sure one could get something running with cygwin + mingw but that would not be a normal windows app and require cygwin to run.

    Maybe there is some way for a native X server windows app but its not one i cant find or see currently.

    Lets see if others have other ideas :)

  • Hi
    This thread ask the same question. It seems possible but nobody knows.

Log in to reply

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