Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to make QtCreator to connect to a remote device (generic linux) with X forwarding enabled `ssh -X`?

How to make QtCreator to connect to a remote device (generic linux) with X forwarding enabled `ssh -X`?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
qtcreatorxforwardingremote-device
3 Posts 2 Posters 4.4k Views
  • 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.
  • I Offline
    I Offline
    ikyb
    wrote on last edited by
    #1

    I develop a cross-platform Qt application with GUI. It works fine on host system in both x32 and x64 variants. Next is to deploy the application on a remote i386 host. It seems to work fine there too, but the app fails to connect to a display, because it does not exist. The solution is to access to remote host with -X option. Definitely. This way it opens window(s) on a local (development) machine.

    How to explain QtCreator->Tools->Devices module to connect via ssh -X?!
    Thanks in advance.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From a quick look at Qt Creator source code, I don't think it's possible currently. However, you should double check with the folks on the Qt Creator mailing list. You'll find there Qt Creator's developers/maintainers.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • I Offline
        I Offline
        ikyb
        wrote on last edited by ikyb
        #3

        Thank you, @SGaist, I followed you advise and community helped to find a solution.

        The way is simple:

        1. Open ssh session to remote host with X forwarding enabled ssh -X user@host. And get know the DISPLAY variable. For example with echo $DISPLAY. It should look like localhost:10.0.
        2. Set environment variable DISPLAY in QtCreator -> Projects -> YourConfiguration -> Run -> RunEnvironment to known value from (1).
        3. Run and enjoy remote debug with GUI on local machine.

        Note: closing ssh session will make forwarded display inaccessible and invalid.

        1 Reply Last reply
        3

        • Login

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