[FreeNX-kNX] Re: Quick-and-dirty batch file for Windows NX client connecting to multiple FreeNX servers with different keys

Doug Burks mubley at gmail.com
Wed Oct 20 13:27:11 UTC 2004


Here's the equivalent quick-and-dirty shell script for Linux NX clients:

#!/bin/bash
nx_dir=/usr/NX
share_dir=$nx_dir/share
echo y | cp $share_dir/client.id_dsa.key.nx1 $share_dir/client.id_dsa.key
$nx_dir/bin/nxclient -session "nx1"

Again, the fourth line is long and may wrap in your reader.  It is of the form:
echo y | cp client...key.nx1 client...key

Doug


On Tue, 19 Oct 2004 20:57:28 -0400, Doug Burks <mubley at gmail.com> wrote:
> Oops...correction below.
> Doug
> 
> On Tue, 19 Oct 2004 20:47:21 -0400, Doug Burks <mubley at gmail.com> wrote:
> [snip]
> > 4.  Build a batch file named nx#.bat to copy the key and execute the NX session:
> > rem Begin nx1.bat batch file
> > @echo off
> > rem Change the following line if you installed to a non-standard location
> > set nx_dir="c:\program files\nx client for windows"
> > echo y | copy %nx_dir%\share\client.id_dsa.key.nx1
> > %nx_share_dir%\client.id_dsa.key
> 
> The last two lines were supposed to be one line but wrapped, and there
> was also a bug.  It should read:
> echo y | copy %nx_dir%\share\client.id_dsa.key.nx1
> %nx_dir%\share\client.id_dsa.key
> 
> So here's the corrected batch file in its entirety:
> @rem Begin nx1.bat batch file
> 
> 
> @echo off
> set nx_dir="c:\program files\nx client for windows"
> echo y | copy %nx_dir%\share\client.id_dsa.key.nx1
> %nx_dir%\share\client.id_dsa.key
> %nx_dir%\nxclient.exe -session nx1
> rem End nx1.bat batch file
>



More information about the FreeNX-kNX mailing list