Special device information properties

Jannis Pohlmann jannis at xfce.org
Mon Jan 11 07:11:28 PST 2010


Hey,

over at Xfce we have an application called thunar-volman that is used
to perform certain actions when a device is plugged into the computer.

It distinguishes between various types of devices (such as
removable media, CD-R/Ws, DVD-R/Ws, cameras, portable music
players, PDAs, printers, tablets, keyboard and mice) and supports
auto-mounting, auto-browsing and launching of arbitrary commands when
devices are plugged in.

Unfortunately it's implemented on top of HAL and mounts volumes with
HAL as well which seems to be incompatible with DeviceKit-disks. When a
volume is mounted with HAL and later someone tries to unmount it with
DeviceKit-disks (via GIO/GVfs which are used in our file manager
thunar), users are asked for the root password. So I'm thinking about
dropping HAL in favor of DeviceKit-disks.

Now my question is: Are all/most/some the device properties supported by
HAL (like camera.access_mode, portable_audio_player or pda.platform)
also available via DeviceKit-disks? I couldn't find them in the
DeviceKit-disks reference manual and they are important for
thunar-volman to work properly.

If this information is not available via DeviceKit-disks, what other 
options do we have; (g)udev for querying device information + GIO for
mounting? Does udev provide the bits information HAL supported before?

Cheers,
Jannis


More information about the devkit-devel mailing list