[FreeNX-kNX] 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 00:47:21 UTC 2004
Hi All,
This is just a quick-and-dirty script I'm using for connecting my
Windows NX client to multiple FreeNX servers with different keys.
Assumptions:
We're connecting to multiple FreeNX servers. The first is called NX1,
the second is called NX2, and so on and so forth. We don't have
control over one or more of the servers (or else we could just force
them to use the same key).
Perform the following for each server (replacing nx# with the name of
the server, nx1, nx2, nxdoug, nxwhatever, etc.):
1. Configure your NX client to connect to the specified NX server.
2. Copy the key from the NX server to the NX client share directory,
but call it "client.id_dsa.key.nx#". For example, the key for server
NX1 would be "client.id_dsa.key.nx1".
3. Copy "client.id_dsa.key.nx#" to "client.id_dsa.key" and verify
that NXClient can connect.
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
%nx_dir%\nxclient.exe -session nx1
rem End nx1.bat batch file
5. Execute the batch file and make sure it works. If you saved your
username/password in the NX session, then you won't even see the
session dialog box since we used the "-session nx1" option to
nxclient.exe.
6. Right-click the batch file and click "Create Shortcut".
7. Right-click the newly-created shortcut and click Properties.
Properties window appears. On the Shortcut tab, click the Change Icon
button. Browse through your filesystem to "c:\program files\nx client
for windows\" and select nxclient.exe. The shortcut to the batch file
should now have the same icon as the normal NXClient shortcut.
After you've done this for all servers, you'll have one shortcut for
each server and you'll never have to manually rename key files again.
Doug
More information about the FreeNX-kNX
mailing list