Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiling a version of qt that runs on macos but uses X11 instead of the native macos gui.
Forum Updated to NodeBB v4.3 + New Features

Compiling a version of qt that runs on macos but uses X11 instead of the native macos gui.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 161 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dan-ca
    wrote last edited by dan-ca
    #1

    I would like a version of qt --- particularly qt5 --- that runs on macos, but uses X11 for display.

    The reason is so that i can run 'ssh -X' from my ubuntu machine to my macos machine, and then run an application compiled against this special version of qt, and the application would then display on the ubuntu machine (over ssh).

    Solutions such as using VNC or other screen sharing will not work for me, because the macos machine may be in use by somebody else at the same time.

    The macos machine is running catalina (10.15.7) and the ubuntu machine is running 20.04.

    (So, the question is: how to run configure to produce such a thing, what arguments to use to specify the X11 includes and X11 libraries, and what arguments to use to tell configure that regardless of what it thinks the host architecture is, i don't want it to create a native macos gui, but rather an X11 gui.)

    I 1 Reply Last reply
    1
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote last edited by
      #2

      AFAIK the last support for x11 on macOS was with Qt4 and it was removed with the binning of Qt5.
      The only feasible way is for you to write and maintain your own platform plugin and at that point a 2nd, as in your own, macOS pc/laptop is probably the better investment of time and money


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • D dan-ca

        I would like a version of qt --- particularly qt5 --- that runs on macos, but uses X11 for display.

        The reason is so that i can run 'ssh -X' from my ubuntu machine to my macos machine, and then run an application compiled against this special version of qt, and the application would then display on the ubuntu machine (over ssh).

        Solutions such as using VNC or other screen sharing will not work for me, because the macos machine may be in use by somebody else at the same time.

        The macos machine is running catalina (10.15.7) and the ubuntu machine is running 20.04.

        (So, the question is: how to run configure to produce such a thing, what arguments to use to specify the X11 includes and X11 libraries, and what arguments to use to tell configure that regardless of what it thinks the host architecture is, i don't want it to create a native macos gui, but rather an X11 gui.)

        I Offline
        I Offline
        IgKh
        wrote last edited by
        #3

        @dan-ca An alternative approach is to used the built-in VNC platform plugin (triggered by starting the application with the -platform vnc argument). It works by starting a private VNC server that serves just the app window, so somewhat similar to (but more limited than) X11 forwarding. IIRC it isn't built by default on macOS but should be possible to add it to a build.

        Though I second the point of getting a physical Mac, it is really the path of least resistance... A M2 Mac Mini is reasonably cheap and is a great extra machine to have even if you daily drive Linux.

        1 Reply Last reply
        1
        • jeremy_kJ Offline
          jeremy_kJ Offline
          jeremy_k
          wrote last edited by
          #4

          At a glance, it's not obvious that the xcb QPA (qtbase/src/plugins/platforms/xcb/xcb.pro) plugin won't work with recent macOS if the requisite supporting libraries and headers are present. Homebrew lists a few potential matches for "brew search xcb", including "libxcb".

          Asking a question about code? http://eel.is/iso-c++/testcase/

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved