On Fri, Feb 29, 2008 at 11:01:49 +0000, Adam Hardy wrote: > Florian Kulzer on 28/02/08 13:53, wrote:
[...] >> Since you want to be independent of the desktop environment, you might >> want to run ivman, usbmount, or a similar daemon. If I remember >> correctly, it is difficult to ensure unique mount points with usbmount >> since it relies on plug-in order. I like the concept of ivman better >> because it relies on HAL, so it should not clash with a running desktop >> environment. I have never tried ivman myself, though. Its sourceforge >> page says it is currently in beta stage. (Both usbmount and ivman are >> available in Etch.) > > The sourceforge website is so slow! Anyway, ivman does the job, although > it mounts my usbstick as /media/sda1, so I'm not sure it will work with > more than one. I haven't got a second usb stick handy to test it with. It > would be nice if it mounted the usb stick using its volume label. I had hoped that this was one of the "user-configurable actions" that are mentioned in the package description of ivman. > Perhaps > that is actually a trick of Thunar (or whichever package it was in xfce). That is difficult to say without looking at the source code. You can always specify a desired mount point policy, which is added to the properties of the device in HAL's list. Furthermore, HAL does provide certain methods for devices, for example "mount", "unmount" and "eject", but it is easily possible to bypass these and (un)mount devices without involving HAL directly. Maybe ivman only uses HAL to discover new removable devices but does not care about the volume label. > But you say it is Hal using the volume label? You can try to specify volume.policy.desired_mount_point explicitly for all removable storage devices. If ivman uses HAL's abstracted "mount" method then this should be honored (as far as I know). More information about all this can be found here: /usr/share/doc/hal-doc/spec/hal-spec.html (in the "hal-doc" package) http://www.freedesktop.org/wiki/Software/hal http://www.redhat.com/magazine/003jan05/features/hal/ To get you started, here is an example of a HAL device information file that requests the mount options "noatime" and "sync" for all partitions on removable media (change this to reflect your own preferences). Furthermore, the desired mount point is set to the volume label if the label exists and if it contains only ASCII characters: --------------- FILE STARTS BELOW THIS LINE --------------- <?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="block.is_volume" bool="true"> <match key="volume.fsusage" string="filesystem"> <match key="@info.parent:storage.removable" bool="true"> <merge key="volume.policy.mount_option.noatime" type="bool">true</merge> <merge key="volume.policy.mount_option.sync" type="bool">true</merge> <match key="volume.label" empty="false"> <match key="volume.label" is_ascii="true"> <merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge> </match> </match> </match> </match> </match> </device> </deviceinfo> --------------- FILE ENDS ABOVE THIS LINE --------------- Save this file in /etc/hal/fdi/policy/; you can call it, for example, "local-usbstick.fdi". Then restart HAL with "invoke-rc.d hal restart" and plug in your USB stick. If ivman obeys the HAL policies then it should be mounted at /media/<volume label>. If this does not work then you can check if HAL at least did its job: $ lshal --long -u $(hal-find-by-property --key block.device --string /dev/sdc1) udi = '/org/freedesktop/Hal/devices/volume_uuid_44E1_54A2' block.device = '/dev/sdc1' (string) block.is_volume = true (bool) block.major = 8 (0x8) (int) block.minor = 33 (0x21) (int) [...] volume.is_partition = true (bool) volume.label = 'usb-flo1' (string) [...] volume.policy.desired_mount_point = 'usb-flo1' (string) volume.policy.mount_option.noatime = true (bool) volume.policy.mount_option.sync = true (bool) (Replace /dev/sdc1 in the hal-find-by-property command above as is appropriate for your USB stick.) -- Regards, | http://users.icfo.es/Florian.Kulzer Florian | -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]