[Development] QtCreator "Generic Linux Device" plugin questions

Christian Kandeler christian.kandeler at digia.com
Mon Jan 14 10:43:49 CET 2013


On 01/12/2013 05:11 PM, a.grandi at gmail.com wrote:
> I'm trying to understand how the "Generic Linux Device" plugin of
> QtCreator works and I've some questions to ask, to understand if it
> already does what I need or if I need to fork it and customize for my
> needs.

Note that this question should really go to the Creator mailing list; 
see http://lists.qt-project.org/mailman/listinfo/qt-creator. Staying on 
this one for now.

> 1) I'm trying to use the "Generic Linux Device" feature of QtCreator 2.6
> to connect to another Linux machine and try to deploy and execute a Qt
> application on it.
>
> The machine where I'm trying to deploy is a normal Xubuntu 12.10 with
> SSH server installed.
>
>>From my working machine to that machine, I can SSH without any
> problem, but from the "Generic Linux Device" panel I cannot connect
> and I get this error during the configuration testing:
>
> Connecting to host...
> SSH connection failure: Timeout waiting for reply from server.
> Device test failed.

This means the authentication was not completed within the timeout you 
set in the device configuration. Usually, it's due to one of these reasons:
     a) The server is slow to answer and the default timeout of 10 
seconds is not enough.
     b) The server's identification string is non-compliant, leading us 
to never progress to the actual authentication.

In the case of a), simply increase the timeout.
I have only really seen b) with some ancient OpenSSH versions, so it 
seems unlikely that this happens on Ubuntu 12.10. Plus, Creator >= 2.6 
tries to handle this in a better way, telling you explicitly about the 
problem.

> I tried to give a look to auth.log in the remote machine and this is what I see:
>
> Dec 16 16:41:01 andrea-1215P sshd[2317]: pam_ecryptfs:
> pam_sm_authenticate: /home/andrea is already mounted
> Dec 16 16:41:01 andrea-1215P sshd[2317]: Accepted password for andrea
> from 192.168.0.6 port 54187 ssh2
> Dec 16 16:41:01 andrea-1215P sshd[2317]: pam_unix(sshd:session):
> session opened for user andrea by (uid=0)
> Dec 16 16:41:01 andrea-1215P sshd[2428]: Received disconnect from
> 192.168.0.6: 11:
> Dec 16 16:41:01 andrea-1215P sshd[2317]: pam_unix(sshd:session):
> session closed for user andrea

Hm, the disconnect happens right after the authentication succeeded. Is 
this by any chance exactly 10 seconds after the initial contact to the 
server?

> Do you have any idea about how to make this work?
> How the remote machine should be configured to accept connections from
> this plugin?

There is no magic involved. An SSH server needs to be running, that's all.

> 2) If I had to execute the previous task manually, without using a
> plugin, I would use scp to copy the compiled binary to the remote
> device: is this a task that the plugin is expected to do or I need to
> customize it someway? If I need to customize it: how?

There is a pre-configured upload step in the plugin, which uses SFTP. 
See the deployment part of your project for the details. This currently 
works only for qmake-based projects. The files to deploy are specified 
via the .pro file's INSTALLS variable.

> 3) The second step I expect after building and deploying a binary is
> to remotely execute the application: normally I would ssh into the
> device/machine and I would run the app displaying it in the running
> "graphic server". Is it something that the plugin already does? How I
> could do it manually?

See the run configuration of your project.

> 4) where can I find the source code of these plugins? I can clone the
> source code of Qt5 where QtCreator is, but what is the folder where I
> can find just the plugins?

The sources are here: http://qt.gitorious.org/qt-creator.


Christian



More information about the Development mailing list