On Wed, Jul 21, 2010 at 02:04:45AM +0200, LuX wrote:
On Mon, Jul 19, 2010 at 03:08:17PM -0400, Kris Maglione wrote:
I'm not terribly fond of pmount either. I'm
currently using a (heavily) modified hal-based mounting script that
does the job quite nicely. Attached.

I like the idea of mounting/unmounting USB pens without using neither
pmount nor any file manager. Unfortunately halmount doesn't work for
me:
$ dash halmount /dev/sdb1
Error org.freedesktop.Hal.Device.Volume.InvalidMountOption: The option
'uid=1114' is not allowed for uid=1114
ERROR: dbus-send failed

You need to run it under ck-launch-session. Starting wmii as above works, or run 'ck-launch-session halmount'.

I have tried to modify the script in various ways without success. I
don't understand how dbus-send works, this is my problem. At least
I have discovered with your script the hal-related commands. Also
halumount works well.

Oh, you don't want to understand how dbus-send works. If you want to change the script, though, you can remove the line that adds uid=... to $OPTIONS, but then ntfs/fat volumes will be owned by root.

@Nick: Thank you for your udev rule. It might be handy, but I'm
not so enthusiastic in using this method: it calls sudo (hence
requires so special preferences for ordinary users, I guess) and I
would be afraid that a hand-made udev rule like this one would be
overwritten the next time I update my system. On the other hand the
wiki of Arch pretends that:

There are those drawbacks (and a few others, like the fact that the owner is always the same regardless of the currently logged in user, and the fact that things are mounted whether you want them or not), but if you use udev/rules.d, you needn't worry about them being overwritten.

HAL is rapidly becoming obsolete in favor of udev. Currently, a
small number of programs still rely on and use HAL, though
development is heading toward utilizing udev as a replacement in the
near future.

So it might be that your method is promised to a greater future.

I don't think so. First of all, that claim is a bit dubious. HAL is, thankfully, being phased out, but it's still widely used for volume management, and udev doesn't provide any similar mountpoint management. Beyond that, you need to use something like pmount and some other method of looking up mountable block devices. When you've done this, of course, you no longer have any standardization of where and how things are mounted (not that HAL does a spectacular job of this, or has a remotely reasonable method of configuring it). And, finally, you have to do this from scratch for every non-Linux operating system you want to use it on.

I've been looking for decent hot-pluggable mounting options for years now, and sadly, HAL seems to be the only workable game in town at the moment.

--
Kris Maglione

Simple things should be simple.  Complex things should be possible.
        --Alan Kay


Reply via email to