September 28, 2011

nonot1 nonot1
Lab Rat
70 posts

Qt Creator: Remote Development (via SSH) for “Desktop” projects?

 

Hello,

Can a Qt Creator Desktop project be configured to work correctly with projects that reside on a different machine? (But accessible via SSH)

Mainly, I want code assistance and remote compilation to function correctly. (Remote execution / debugging would be great.. but not as critical.)

My desired development machine is very different from the machine my application will compile and run on. It has a different Linux distribution, different compiler version, different system include layout, etc. The network link is not fast enough to just run Qt Creator remotely via X/VNC.

I tried mounting the codebase folder from the deployment machine on my dev box via SSHFS. However, this does not work very well. Qt Creator’s code completion is broken since all the include paths are all wrong. Obviously compilation does not work either.

Can this be done?

Thank you

12 replies

September 28, 2011

Volker Volker
Robot Herder
5428 posts

I dont’t see a decent solution for this problem. The include path problem is hardly to solve (besides entirely mounting the remote box and adding the include paths from there). Regardless of which method you use to load the file to be edited, the includes etc. are always missing.

If your development environments are not too different, I would suggest to develop locally and use a source code management system like git or mercurial (maybe subversion) to sync your codebase. Being platform independent, this usually works quite well with Qt projects. You will have to update the code on the remote machin an build from the command line.

September 29, 2011

fluca1978 fluca1978
Ant Farmer
524 posts

I believe the only solution to get a good development environment is to use x forwarding, but if your link is not fast enough it will not be usable. So my second choice would be to mount the remote filesystem and the include/library path so to create a kind of sendbox where I can work locally having all the files remotely. Another possibility is to setup a virtual machine that is configured as the remote target machine and finally the last solution is to use a tool for filesystem sync (DVCS or VCS or even an ad-hoc script) and compile on the remote machine via terminal emulation. It would not be hard after all, thanks to (q)make, but it will become more difficult to debug.

September 29, 2011

Andre Andre
Area 51 Engineer
6031 posts

Did you try NoMachine NX? I found it performed very well for me in the past for x forwarding, even on an only half-decent network connection.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

September 29, 2011

Eus Eus
Lab Rat
121 posts

Why forward X when he can start vnc server, even if the machine doesn’t run in graphical mode. Using vnc server and accessing via vnc viewer would allow him to reconnect and continue working even if the connection drops.

Other thing could be to start a version/revision control system on the server and update it with the needed data, then compile via the ssh link he has. Qt Creator already has integration with Bazaar, Mercurial and Git, so I think that would be the best solution in this case.

September 29, 2011

Andre Andre
Area 51 Engineer
6031 posts

NX can do those tricks as well, and is generally faster than VNC.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

September 29, 2011

Eus Eus
Lab Rat
121 posts

hm, okay, I can’t say I used NX lately, so could be good as well, but he did say his connection to that computer is really slow. I guess both vnc and nx wouldn’t be good choice in that case.

October 3, 2011

nonot1 nonot1
Lab Rat
70 posts

Hi all,

Thanks for the advice. The link is slow but the bigger issue is latency and jitter, so remote desktop anything is not going to work.

I see that NetBeans has some capability for remote c/c++ development via SSH. Somehow it picks up include paths, etc via the remote shell connection.

See: http://netbeans.org/kb/docs/cnd/remotedev-tutorial.html

NetBeans even has rudimentary Qt support, but I’d much rather use Qt Creator.

Is this kind of setup possible with Qt Creator? If not, is it on the feature map? (Seems like it’d be helpful for developing Mobile apps with real HW too.)

Thank you

March 7, 2012

krizajb krizajb
Lab Rat
1 posts

Helo,

Have you made any progress? I am trying to do the same thing but I am slowly loosing the will. Atm I have tried lunching gdbserver process on my centos 6 remote server and tried connecting via QtCreator remote debugging tool on my local Ubuntu development machine. Debugger starts but it soon fails saying no executable given. So I mounted folder containing binary I wish to debug from remote server and finally got error about miss matching libs. From this point on I’m lost.

I also tried remote development from eclipse, established eclipse connection using ssh and creating remote C/C++ project which even builds if I create makefile by my own but eclipse doesn’t recognizes binary so I can’t even run/debug it using eclipse (works via terminal). Tried given binary parsers without success. I also think this is the only way this thing will work since it uses remote compiler and library’s.

I am thinking of creating virtual machine with same setup on my centos 6 remote machine and remote debugging from it, but I’m afraid even then I will get some kind of lib version miss matches since server doesn’t have X installed.

Tomorrow I will carefully read all the replays and try them out.

March 13, 2012

nonot1 nonot1
Lab Rat
70 posts

Hi krizajb,

Nope. Never got this to work.

I wish I could.

May 21, 2012

aabc aabc
Robot Herder
257 posts

What error message do you get ?

August 16, 2012

shawn shawn
Lab Rat
2 posts

Hi All,

Okay. I have to say, I tested NX, and I noticed that it used a few Mbps vs. Windows RDP which used only a couple hundred kbps. Any tricks to get NX to be smarter/more efficient?

Thanks

August 16, 2012

Tobias Hunger Tobias Hunger
Mad Scientist
3149 posts

There is also sshfs which can mount directories from a remote machine via SSH. That could get access to the sources. Not sure how the filesystem will impact performance.

 
  ‹‹ Need help with Nokia Analyze Tool      [SOLVED]choosing the build/run library problem ››

You must log in to post a reply. Not a member yet? Register here!