<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">After some debugging I found two issues.<div>Issue number seems to be a bash related error. </div><div><br></div><div>Minimal example:</div><div><br></div><div># OSX</div><div><br></div><div><div>kebab:~ me$ bash --version</div><div>GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)</div><div>Copyright (C) 2007 Free Software Foundation, Inc.</div><div><br></div><div>kebab:~ me$ test_cmd="ENVVAR=\"foo\" ls"</div><div><br></div><div>kebab:~ me$ $test_cmd </div><div>-bash: ENVVAR="foo": command not found</div><div><br></div><div>kebab:~ me$ $($test_cmd)</div><div>-bash: ENVVAR="foo": command not found</div></div><div><br></div><div># LINUX, Ubuntu 10.04</div><div><br></div><div><div>apollo:~$ bash --version</div><div>GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)</div><div>Copyright (C) 2009 Free Software Foundation, Inc.</div><div>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></div><div><br></div><div>This is free software; you are free to change and redistribute it.</div><div>There is NO WARRANTY, to the extent permitted by law.</div><div><br></div><div>apollo:~$ test_cmd="ENVVAR=\"foo\" ls"</div><div><br></div><div>apollo:~$ $test_cmd </div><div>ENVVAR="foo": command not found</div><div><br></div><div>apollo:~$ $($test_cmd)</div><div>ENVVAR="foo": command not found</div></div><div><br></div><div>I do not know whether this is a bug in bash or expected behaviour.</div><div>I mention the examples here because a code pattern like that is used </div><div>in nxnode. I managed to fix it by changing it to the following:</div><div><br></div><div><br></div><div><div>--- nxnode.orig 2010-07-26 18:56:00.000000000 +0200</div><div>+++ nxnode 2010-07-26 19:05:10.000000000 +0200</div><div>@@ -1921,9 +1921,9 @@</div><div> # dimbor: add russian, save cmdstr and kill dialogs</div><div> if [ -n "$SMB_MOUNT_OPTIONS" ]</div><div> then</div><div>- MNTSTR="PASSWD=\"$password\" $COMMAND_SMBMOUNT //$computername/$share $dir -o username=$username,ip=127.0.0.1,port=$port,$SMB_MOUNT_OPTIONS 2>&1"</div><div>+ MNTSTR="$COMMAND_SMBMOUNT //$computername/$share $dir -o username=$username%$password,ip=127.0.0.1,port=$port,$SMB_MOUNT_OPTIONS 2>&1"</div><div> else</div><div>- MNTSTR="PASSWD=\"$password\" $COMMAND_SMBMOUNT //$computername/$share $dir -o username=$username,ip=127.0.0.1,port=$port 2>&1"</div><div>+ MNTSTR="$COMMAND_SMBMOUNT //$computername/$share $dir -o username%$password=$username,ip=127.0.0.1,port=$port 2>&1"</div><div> fi</div><div> echo "$DELIM 701 Attempt to start $MNTSTR"</div><div> error=$($MNTSTR)</div><div><div><br></div><div>This seems to work when manually trying on the command line.</div><div><br></div><div>The other issue i am having is that nxnode seems to be called with </div><div>normal user uid instead of uid 0, thus mount fails. </div><div><br></div><div>I guess it would be nice if Marcelo Boveto Shima could say something about t</div><div>his, because it seems that he is the one who packaged freenx for the freenx stable ppa.</div><div><br></div><div>I could of course set the sticky bit on mount.cifs/mount.smbfs, but i do not think</div><div>that that is the right approach. </div><meta charset="utf-8"><div><br></div><div>Regards,</div><div><br></div><div>Johannes Scholz</div><div><br></div><div>Am 26.07.2010 um 16:33 schrieb <a href="mailto:chris@ccburton.com">chris@ccburton.com</a>:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<br><tt><font size="2">Johannes Scholz <<a href="mailto:lgdlubyou@googlemail.com">lgdlubyou@googlemail.com</a>> wrote
on 26/07/2010 14:41:27:<br>
<br>
> Hi Chris</font></tt>
<br>
<br><tt><font size="2">Hi</font></tt>
<br>
<br><tt><font size="2">> <br>
> Am 26.07.2010 um 15:23 schrieb <a href="mailto:chris@ccburton.com">chris@ccburton.com</a>:</font></tt>
<br><tt><font size="2">> <br>
> Do you mean you can mount the workstation's shares on the NX server
<br>
> from within the NX session, over the ssh tunnel ??? </font></tt>
<br><tt><font size="2">> <br>
> This is exactly what i can do, ie</font></tt>
<br><tt><font size="2">> i can connect to the freenx server using nx client
and then do something like</font></tt>
<br><tt><font size="2">> <br>
> mount -t smbfs //mycomputer.local/my_share /mnt -o <br>
> username=myusername,ip=127.0.0.1,port=5000</font></tt>
<br><tt><font size="2">> <br>
> on the console (which seems to be what the node bash script does).</font></tt>
<br><tt><font size="2">> <br>
> As far as timeouts go - maybe, but its a big maybe since i do not
<br>
> seem to have issues with latency, bandwidth etc.</font></tt>
<br>
<br><tt><font size="2">It's mainly to do with the length of time it takes
to set up the tunnel,</font></tt>
<br><tt><font size="2">but you also get issues of you are mounting several
shares.</font></tt>
<br>
<br><tt><font size="2">As a diagnostic/bodge try adding a </font></tt>
<br>
<br><tt><font size="2">
sleep 10</font></tt>
<br>
<br><tt><font size="2">at about line 1400 in nxnode, after</font></tt>
<br>
<br><tt><font size="2"> # sometimes the
samba port we get from nxserver is not the right one, so let's get it from
nxagent</font></tt>
<br>
<br><tt><font size="2">and see if that gets it going.</font></tt>
<br>
<br>
<br><tt><font size="2">A better fix of course, is to put </font></tt>
<br>
<br><tt><font size="2"> error=$(PASSWD="$password"
$COMMAND_SMBMOUNT "//$computername/$share" "$HOME/$dir"
-o username="$username",ip=127.0.0.1,port=$port 2>&1)</font></tt>
<br>
<br><tt><font size="2">in a loop, testing the return code, for a couple of
attempts with a sleep 1</font></tt>
<br><tt><font size="2">in it for when it fails.</font></tt>
<br>
<br><tt><font size="2">Note, most people don't seem to use this, or the printing,
hence the lack</font></tt>
<br><tt><font size="2">of interest . . .</font></tt>
<br>
<br><tt><font size="2">Let us know how you get on . . . .</font></tt>
<br>
<br><tt><font size="2">> <br>
> Regards,</font></tt>
<br><tt><font size="2">> <br>
> Johannes Scholz</font></tt>________________________________________________________________<br> Were you helped on this list with your FreeNX problem?<br> Then please write up the solution in the FreeNX Wiki/FAQ:<br><br><a href="http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ">http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ</a><br><br> Don't forget to check the NX Knowledge Base:<br> http://www.nomachine.com/kb/ <br><br>________________________________________________________________<br> FreeNX-kNX mailing list --- FreeNX-kNX@kde.org<br> https://mail.kde.org/mailman/listinfo/freenx-knx<br>________________________________________________________________</blockquote></div><br></div></body></html>