Re: [Development] QtCreator Generic Linux Device plugin questions

2013-01-14 Thread Christian Kandeler
On 01/12/2013 05:11 PM, a.gra...@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
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QtCreator Generic Linux Device plugin questions

2013-01-14 Thread a.gra...@gmail.com
Hi!

On 14 January 2013 10:43, Christian Kandeler
christian.kande...@digia.com wrote:
 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.

oh sorry for that, I really didn't know we have a mailing list for that.
If it's ok for everyone I will keep here just this thread and I will
use that list for future threads about QtCreator.

 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.

luckly it was the reason a :)
I increased the timeout to 20s and it worked! I was able to connect,
deploy and run a Qt application on my remote netbook.

 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.

can I also specify the destination in my .pro?
I explain my problem. The default behaviour is to deploy
MyTestProject in /opt/MyTestProject/ on the remote device.
I fixed the problem just giving chmod 777 to the /opt but this is
just a workaround. I could deploy my app to the /home/user folder or
just give user RW permissions for /opt
Which method do you think it would be better?

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

ok, thanks! Even if at the moment I hope I won't have to change
anything in the code.

Best regards,

-- 
Andrea Grandi -  Software Engineer / Qt Ambassador
Ubuntu Member: https://launchpad.net/~andreagrandi
website: http://www.andreagrandi.it
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QtCreator Generic Linux Device plugin questions

2013-01-14 Thread Christian Kandeler
On 01/14/2013 01:51 PM, a.gra...@gmail.com wrote:
 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.

 can I also specify the destination in my .pro?

Yes, via the target.path variable.

 I explain my problem. The default behaviour is to deploy
 MyTestProject in /opt/MyTestProject/ on the remote device.

No, there is no default path, at least not in the source code. If your 
project is deployed to /opt, then that's set in the project file. 
Presumably you used Creator's Qt Quick app wizard, which writes such a 
project file,

 I fixed the problem just giving chmod 777 to the /opt but this is
 just a workaround. I could deploy my app to the /home/user folder or
 just give user RW permissions for /opt
 Which method do you think it would be better?

Whatever fits your use case. Using the /home directory seems much less 
intrusive.


Christian
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] QtCreator Generic Linux Device plugin questions

2013-01-12 Thread a.gra...@gmail.com
Hi,

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.

For some weeks I could not work to this and now I will try to restart
from where I left (so from the first question).

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.

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

Please note that I've configured my QtCreator options like in this
picture: 
https://twitter.com/i/#!/andreagrandi/media/slideshow?url=pic.twitter.com%2F93vkYQpV

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

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?

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?

Please note that all these tasks I'm trying to do are the same that we
does with Harmattan plugin or with the actual BlackBerry plugin, for
this reason I would like not to re-invent the wheel.

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?

Thanks for your help :)

p.s: I bet that you are curious to know why I need all of this or
probably you have already guessed ;)

--
Andrea Grandi -  Software Engineer / Qt Ambassador
Ubuntu Member: https://launchpad.net/~andreagrandi
website: http://www.andreagrandi.it
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development