[FreeNX-kNX] nxclient - only one key per client?
Rick Stout
zipsonic at gmail.com
Mon Feb 28 18:34:04 UTC 2005
Tomasz Chmielewski wrote:
> Christian Lensch wrote:
>
>> Hi,
>> why dont you write yourself a little wrapper-script for the nxclient
>> that sets a link to the key for the respective server before
>> connecting and removes it after?
>
>
> do you think it can be done?
>
This has been talked about a few times on the list, and I get someone
emailing me every couple of weeks. So, ill repost the original mailing
on this.
> this script would have to be run just before connecting to a server from
> the list, and how to run a custom script on a basis of a chosen server
> in already run client?
>
> even if it's possible, this would be a workaround only - imagine a web
> browser capable of connecting to one page only (and unless you write
> your own script to access kde.org and google.com, you can view
> micro$oft.com only).
Not quite the same thing, but I get your point. !M has said they were
working on a client that would support multiple keys.
As for the "workaround", here is something to get you started.
Save this as /usr/bin/startnx
---Begin File ---
#!/bin/bash
nx_dir=/usr/NX
share_dir=$nx_dir/share
clientkey=client.id_dsa.key
MINPARAMS=1
if [ $# -lt "$MINPARAMS" ]
then
echo "Usage: startnx {session name}"
else
if ! [ -f ${share_dir}/${clientkey}.${1} ]
then
echo "Session key ${share_dir}/${clientkey}.${1} doesn't exist."
else
cp -f ${share_dir}/${clientkey}.${1} ${share_dir}/${clientkey}
${nx_dir}/bin/nxclient -session ${1}
fi
fi
---End File ---
Copy the key files for each session to their respective names. E.g.
nx1 -> /usr/NX/share/client.id_dsa.key.nx1
local -> /usr/NX/share/client.id_dsa.key.local
etc...
you will need to change the permissions to the key files:
chmod 666 /usr/NX/share/client.id_dsa.*
and make your script executable:
chmod 755 /usr/bin/startnx
Then invoke like this:
startnx nx1
NOTE: This should only be done when you are the only one on your client
system. If it is a shared system, then you keys will be visible to other
users.
Regards,
Rick Stout
More information about the FreeNX-kNX
mailing list