[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[K12OSN] mount remote share, launch file manager, unmount share--how?

I want to use afpfs-ng (a new version was just released) to allow students to access their files on the district's "central storage server" which is a Mac server that will only talk over AFP, as decreed by the district techs. On the client desktops, we're using autologins, so my thought was to create a create a script that queries the user for an ID & PW, then passes those parameters to afpfs-ng to mount the user's personal directory from the Apple server, and then call Nautilus or some other file manager and point it at the mountpoint so students can get to their files. We'd put an icon on the desktop that calls the script. Here's the tricky part: I want the share to be unmounted when the file manager is shutdown. That way, all a student has to do is close the file manager window and the mount will go away, so another student can't come along afterward and mess with the previous student's files. The script would look something like this:

get user ID & PW
mount directory via afpfs-ng
call Nautilus and point it at mountpoint
wait until Nautilus is shut down, then unmount mountpoint

The problem is this doesn't work with Nautilus because it's part of Gnome and so doesn't maintain a separate PID that I could monitor and use as a trigger for unmounting. I suppose I could call Konqueror, but that loads so much overhead that it takes a while to come up. I'd prefer to use Nautilus because it's the same, for the users, as when they open the local directories. Any ideas?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]