Notification icon for mounted (aka. in use) LTSPFS devices like USB drives

LTSP uses a FUSE-based filesystem (LTSPFS) for providing access to devices that are attached to the thin client, but are used on the terminal server in the user's session. The creators of LTSPFS took an unconventional approach: users cannot (and are not supposed to) manually eject these LTSPFS mounts, the system does this on it's own after 5 seconds of inactivity (at least it's 5s in Karmic). This is meant to make use of USB devices more comfortable. Unfortunately LTSPFS does not provide any means to the user to detect whether the device is still in use or not. My small modification comes here in play.

By patching the /usr/sbin/ltspfs_mount and /usr/sbin/ltspfs_umount scripts to execute custom "event handlers" (placed in /etc/ltspfs/mount.d and /etc/ltspfs/umount.d) one can create his own notification icons for mounted USB devices.

The necessity of this functionality comes from the fact (that LTSPFS developers probably missed) that the use of LTSPFS devices is not as obvious to the user as it might seem. Not only file manager operations (started by the user) can keep the device busy, but background processes too. What bit me in the butt was System Monitor. By default it's checking interval is 5 seconds, exactly the same period as the LTSPFS's inactivity timeout. If you set up System Monitor's applet to monitor disk activities too, it'll never let your LTSPFS devices unmount automatically (as described in my other post). An average user would only notice that LTSPFS fails (files copied to the USB drive are not there after unplugging and re-plugging the device) and there's no apparent reason for it (since the user does not see that the device never got unmounted).

My little mod. adds a small icon to the notification area as long the device is mounted on the client. This way the user will at least know that something is still using the device and won't unplug it unknowningly. For the modification see the attached files (it contains a readme.txt for installation instructions).

Of course there are a number of apps that might cause similiar problems, eg. desktop search (file indexing) applications, automatic backup applications, etc. So it's not just Gnome's System Monitor, but a generic problem.

AttachmentSize
ltspfs-mount-notifications_20100711.tgz5.36 KB