| View previous topic :: View next topic |
| Author |
Message |
CMoH
Joined: 09 Apr 2010 Posts: 3
|
Posted: Fri Apr 09, 2010 9:59 pm Post subject: Problem running remotely compiled application using X11 forwarding |
|
|
Hey. I have set up a remote Linux box to develop a Qt-based application. The reason I have this setup is because the two computers have different architectures.
Right now I am at the following standpoint:
I can compile the code successfully on the remote box
I can connect with "ssh -X my-remote-box" and execute the Qt application from the shell of the remote box, using my development's X server and all works just fine.
However, I cannot run/debug the application from netbeans (6.8, up-to-date) because I get the following messages:
| Code: |
my-qt-app: cannot connect to X server localhost:10.0
RUN FAILED (exit value 1, total time: 114ms)
|
So, what can I do to make netbeans use my external ssh command? How can I debug and change what's happening wrong?
From a quick look it seems like the SSH client used by netbeans is setting the DISPLAY environment correctly, but fails to do the actual X11 forwarding. However, this is just a hunch. |
|
| Back to top |
|
 |
Vladimir Voskresensky Posted via mailing list.
|
Posted: Sat Apr 10, 2010 6:07 pm Post subject: Problem running remotely compiled application using X11 forwarding |
|
|
By default we have X-forwarding OFF.
Can you check in remote host properties if X forwarding in OFF and turn
it ON?
(Tools->Options->C/C++->Build Tools, "Edit" button near combobox with
hosts, Properties in hosts dialog.
Thanks
Vladimir.
CMoH wrote:
| Quote: | Hey. I have set up a remote Linux box to develop a Qt-based application. The reason I have this setup is because the two computers have different architectures.
Right now I am at the following standpoint:
* I can compile the code successfully on the remote box
* I can connect with
Code:
ssh -X my-remote-box
and execute the Qt application from the shell of the remote box, using my development's X server
However, I cannot run/debug the application from netbeans (6.8, up-to-date) because I get the following messages:
Code:
my-qt-app: cannot connect to X server localhost:10.0
RUN FAILED (exit value 1, total time: 114ms)
So, what can I do to make netbeans use my external ssh command? How can I debug and change what's happening wrong?
|
|
|
| Back to top |
|
 |
CMoH
Joined: 09 Apr 2010 Posts: 3
|
Posted: Sat Apr 10, 2010 6:46 pm Post subject: |
|
|
Thanks for your interest, Vladimir.
Yes, the remote host has the check box checked. If I leave that box unchecked, the error message is the same as if running ssh without the -X (or -Y) option, namely
| Code: |
my-qt-app: cannot connect to X server
|
(As you can see, the difference is that the DISPLAY environment variable is not set) |
|
| Back to top |
|
 |
toby
Joined: 04 Jun 2010 Posts: 2
|
Posted: Fri Jun 04, 2010 9:49 am Post subject: |
|
|
I have the same problem with X11 forwarding in Netbeans. My "Enable X11 forwarding"-box is also checked, but I get the same error message mentioned above.
Anyone found a solution?
Thanks! |
|
| Back to top |
|
 |
alexey_vladykin
Joined: 26 May 2009 Posts: 54
|
Posted: Fri Jun 04, 2010 11:07 am Post subject: |
|
|
It works for me after executing xhost + on local host.
If that does not help in your case, you can launch NetBeans with verbose logging enabled, run your Qt app, and then take a look at the logs (NBUSERDIR/var/log/messages.log). Maybe they'll give us a clue.
NetBeans flags to enable verbose logging:
-J-Dnativeexecution.support.logger.level=100 -J-Dcnd.remote.logger.level=100 |
|
| Back to top |
|
 |
toby
Joined: 04 Jun 2010 Posts: 2
|
Posted: Fri Jun 04, 2010 11:51 am Post subject: |
|
|
xhost + did not work. I post the last part of the log-file, which I think is relevant (maybe line "ERROR: Communication with process 20939 has been lost" is associated with the problem):
| Quote: |
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /home/cluster/pr28to/xxx/vea/Freeway_1/dist/Default/GNU-Linux-x86/freeway_1: State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /var/tmp/dlight_xxx/fc43cfe2/tools/Linux-x86_64/prof_monitor "-ms" "20939": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 sh "-c" "while head -n1 /proc/stat && head -n1 /proc/20939/stat; do sleep 1; done": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 sh "-c" "while head -n1 /proc/stat && head -n1 /proc/20939/stat; do sleep 1; done": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /home/cluster/pr28to/xxx/vea/Freeway_1/dist/Default/GNU-Linux-x86/freeway_1: State changed: RUNNING -> FINISHED
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /var/tmp/dlight_xxx/fc43cfe2/tools/Linux-x86_64/prof_monitor "-ms" "20939": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "20939": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 sh "-c" "while head -n1 /proc/stat && head -n1 /proc/20939/stat; do sleep 1; done": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 sh "-c" "while head -n1 /proc/stat && head -n1 /proc/20939/stat; do sleep 1; done": State changed: RUNNING -> CANCELLED
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 sh "-c" "while head -n1 /proc/stat && head -n1 /proc/20939/stat; do sleep 1; done": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 sh "-c" "while head -n1 /proc/stat && head -n1 /proc/20939/stat; do sleep 1; done": State changed: RUNNING -> CANCELLED
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "20939": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "20939": State changed: RUNNING -> FINISHED
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21278": State changed: INITIAL -> STARTING
FINE [nativeexecution.support.logger]: ERROR: head: cannot open `/proc/20939/stat' for reading: No such file or directory
FINE [nativeexecution.support.logger]: ERROR: head: cannot open `/proc/20939/stat' for reading: No such file or directory
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21278": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21278": State changed: RUNNING -> FINISHED
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21166": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21166": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21166": State changed: RUNNING -> FINISHED
FINEST [cnd.remote.logger]: Synchronizing dir /home/tobias/.netbeans/6.9rc2/var/cache/cnd/remote-includes/yyy.de_22/usr/local/include with xxx@yyy.de:22:/usr/local/include
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: RUNNING -> FINISHED
FINEST [cnd.remote.logger]: Synchronizing dir /home/tobias/.netbeans/6.9rc2/var/cache/cnd/remote-includes/yyy.de_22/usr/x86_64-suse-linux/include with xxx@yyy.de:22:/usr/x86_64-suse-linux/include
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: RUNNING -> FINISHED
FINEST [cnd.remote.logger]: Synchronizing dir /home/tobias/.netbeans/6.9rc2/var/cache/cnd/remote-includes/yyy.de_22/usr/local/include with xxx@yyy.de:22:/usr/local/include
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /var/tmp/dlight_xxx/fc43cfe2/tools/Linux-x86_64/prof_monitor "-ms" "20939": State changed: RUNNING -> CANCELLED
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21053": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: RUNNING -> FINISHED
FINEST [cnd.remote.logger]: Synchronizing dir /home/tobias/.netbeans/6.9rc2/var/cache/cnd/remote-includes/yyy.de_22/usr/x86_64-suse-linux/include with xxx@yyy.de:22:/usr/x86_64-suse-linux/include
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: INITIAL -> STARTING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21053": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/kill "-KILL" "21053": State changed: RUNNING -> FINISHED
FINE [nativeexecution.support.logger]: ERROR: Communication with process 20939 has been lost
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: STARTING -> RUNNING
FINEST [nativeexecution.support.logger]: xxx@yyy.de:22 /bin/sh "-s": State changed: RUNNING -> FINISHED
|
|
|
| Back to top |
|
 |
Heiko
Joined: 08 Dec 2010 Posts: 1 Location: Raben Steinfeld, Germany
|
Posted: Wed Dec 08, 2010 9:37 am Post subject: |
|
|
hi all,
i had the same problem but i found a little workaround.
i started a ssh session to the remote machine with "ssh -X user@host" and run "echo $DISPLAY" to get "localhost:10.0". (i don't know if it is always the same)
you have to keep this ssh session running to use its X forwarding.
in netbeans i disabled X11 forwarding. In projects properties -> Run -> Environment i set "DISPLAY" with value "localhost:10.0".
now the X11 forwarding works. in the moment i'm not really successfull with debugging my project, but i think that another problem.
kind regards
Heiko |
|
| Back to top |
|
 |
idhan
Joined: 10 Jan 2010 Posts: 6
|
Posted: Sun Apr 01, 2012 10:15 am Post subject: |
|
|
I have the same problem with netbeans 7.1.1 (c++),
however Heiko workaround does the job
I hope the problem is solve in the next version of netbeans. |
|
| Back to top |
|
 |
|