[FreeNX-kNX] Re: floppy, cdrom access for roaming users
Chris Fanning
christopher.fanning at gmail.com
Tue Jan 25 09:46:44 UTC 2005
Hi,
Well, nobody got back to me on the roaming users question.
Does that mean that there really isn't a solution already worked out?
I find that hard to believe. One of the benifits of using thinclients
is the freedom of movement it offers. In our case, during certain
months of the year, staff is moved from one office space to another.
It's only normal that their cdrom and floppy drives move with them!
Howto make the drives follow the users thinclient.
This is really beta and without doubt can be improved a lot!
as root
mkdir /usr/share/terminal
in the new directory, make a file nxuserip
****content of nxuserip******
#! /bin/bash
if [ -z "$1" ]; then
echo usage: Expecting a uid.
exit
fi
nxserver --list | awk -v uid="$1" '$2 == uid { ip=$3 } END {print ip}'
******************
make another file floppy.desktop.template
We are using gnome. If you're using another, you will want to change
the content of this file.
**content of floppy.desktop.template**
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=No name
Type=Link
URL=smb://nxclient/fd
TryExec=
X-GNOME-DocPath=
Terminal=false
Name[en_ES]=floppy
GenericName[en_ES]=
Comment[en_ES]=
Icon=/usr/share/pixmaps/gfloppy.xpm
*****************
make another file, icon_setup
***content of icon_setup*****
#! /bin/bash
client_ip=$(sudo /usr/share/terminal/nxuserip $USER)
desktop_icon=$HOME/Desktop/floppy.desktop
sed "s/nxclient/$client_ip/g"
/usr/share/terminal/floppy.desktop.template > $desktop_icon
******************
Ok. now you need to install sudo if you don't already have it.
Then edit
/etc/sudoers
and add the line
ALL localhost = NOPASSWD: /usr/share/terminal/nxuserip
Now run /usr/share/terminal/icon_setup when your desktop starts up,
and that's it.
This relies on a working samba server on the thinclient. PXES provides
an easy to use solution.
Problems.
nxserver --list, reports old sessions (needs to be fixed?). The awk
command returns the last occurance of the username in nxserver's
output. This may not be your current session meaning that the floppy
icon will point to smb://somewhere_else/fd
A possible security propblem with the sudo config
ALL localhost = NOPASSWD: /usr/share/terminal/nxuserip
allows all users to easily consult the current ip of any username
Underlying samba server config is loaded before the user logs in. How
can the samba server allow access to it's shares for this particular
user and no other?
Chris.
On Tue, 18 Jan 2005 11:09:39 +0100, Chris Fanning
<christopher.fanning at gmail.com> wrote:
> Hi,
>
> I've successfully setup freenx on the pxes thinclient.
> I'd now like to get floppy, cdrom y usbflash working.
> I have done this with pxes. PXES runs a samba server on the thinclient
> and from within my nx serssion ontop of pxes I can access the floppy
> via smb://thinclient/fd
>
> The nx wizard has the option to activate floppy, cdrom access too.
> How does this fit in with the underlying (pxes) samba server?
>
> One of our reasons to use thinclients is to allow staff to move about
> from one office space to another (nomachine right! :) . I can see the
> difficulty of accessing local drives via ip for roaming users. Perhaps
> use a script that checks the users ip with 'nxserver --list' when the
> user logs on and then create some links on their desktop (or something
> like that).
> How is this problem approached from freeNX?
>
> Chris
>
More information about the FreeNX-kNX
mailing list