[dev] wmii: automount USB pens [was: dash, bash and tests in wmiirc]

From: LuX <lux.onthenet_AT_free.fr>
Date: Wed, 21 Jul 2010 02:04:45 +0200

Hi!

On Mon, Jul 19, 2010 at 03:21:43PM -0700, Suraj Kurapati wrote:
> # the ck-launch-session is for proper automounting of USB drives
> # see http://bbs.archlinux.org/viewtopic.php?id=84635&p=3
> ck-launch-session wmii

I didn't know this. So it is possible to manage volumes with thunar
in wmii like in other environments just by mean of this command. This
is good to know.

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

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.

Combining all these new ideas, I was happy to improve a little bit my
first script so that it allows me to deal comfortably with USB pens in
wmii, without using pmount. Instead I'm using hal-related commands to
mount devices with thunar-volman, and unmount them with dbus (as you
do with halumount).

Most of all I like the fact that doing this way, I can mount a USB pen
with my button in the right bar and unmount it with Thunar (and
conversely) without any problem. Thank you for that!

I have posted the new version on the same post:
https://bbs.archlinux.org/viewtopic.php?pid=794658#p794658

By the way, I have done it entirely in wmiirc_local, as you suggested.

@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:

> 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.

Regards,
LuX.
Received on Wed Jul 21 2010 - 02:04:45 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 21 2010 - 02:12:02 CEST