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

Kari Oikarinen kari.oikarinen at qt.io
Mon Dec 18 11:21:53 CET 2017



On 18.12.2017 12:19, Kari Oikarinen wrote:
> 
> On 18.12.2017 11:56, Иван Кувалдин wrote:
>> Hello.
>>
>>
>> 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 works fine there too. But when I 
>> run the app on the remote host through QtCreator, it 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`?!
>> I believe there is a hidden configuration option in some file, and no 
>> need to recompile.
>> Thanks in advance.
>>
> 
> Have you set the environment variable DISPLAY to ":0" (or whatever is
> correct) on your run environment?
> 
> It can be done in Projects > (Your kit) > Run > Run Environment.
> 

Never mind, I didn't think this through. That would allow you to solve
the issue of not finding a display on the remote device. But the window
would still open on the remote device, not local device as with
`ssh -X`.

-- 
Kari



More information about the Qt-creator mailing list