Need testers for LTSP thin client device popup in KDE
The last few days Vagrant and I have been looking into how to get LTSP
thin clients to get a popup in KDE when a USB stick and other local
devices are inserted on the client. The work and progress is
documented in bug #575031.
One approach we considered is to use hal to notify KDE about the LTSP
mounts. This script should implement this approach. Can someone with
a LTSP test lab test how this approach work when several users are
logged into the same server and insert USB sticks on their thin
client. What happen if a USB stick is inserted on the server itself?
tjener:~# cat /etc/ltspfs/mounter.d/hal-notify
#!/bin/sh
case "$1" in
add)
mountpoint="$2"
devname=$(basename "$mountpoint")
halname="storage_serial_LTSP_$devname"
cat <<EOF | hal-device --add "$halname"
block.is_volume = true (bool)
block.storage_device = '/org/freedesktop/Hal/devices/$halname' (string)
storage.removable = true (bool)
storage.hotpluggable = true (bool)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
info.product = 'LTSP $devname' (string)
info.parent = '/org/freedesktop/Hal/devices/computer' (string)
volume.fstype = 'ltspfs' (string)
volume.fsusage = 'filesystem' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = true (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = false (bool)
volume.label = '' (string)
volume.mount_point = '$mountpoint' (string)
EOF
;;
remove)
mountpoint="$2"
devname=$(basename "$mountpoint")
halname="storage_serial_LTSP_$devname"
hal-device --remove "$halname"
;;
cleanup)
# XXX Not quite sure what is supposed to happen here
;;
esac
tjener:~#
Happy hacking,
--
Petter Reinholdtsen
Reply to: