In order to port thunar-volman to udev and GIO, we need to collect
information about how device types can be distinguished via udev. Mounting
removable media should be a no-brainer if we use GVolumeMonitor and GIO.

How to reliably identify certain device types via udev/GIO

Storage

Removable Drives (CD/DVD/Blu-ray drives, no mass storage devices)

Udev property

Value

DEVTYPE

disk

ID_TYPE

cd/…

SUBSYSTEM

block

Removable Media

Udev property

Value

DEVTYPE

partition

DKD_PARTITION

1

ID_FS_USAGE

filesystem

ID_TYPE

disk

SUBSYSTEM

block

Encrypted Removable Media

Udev property

Value

DEVTYPE

partition

ID_FS_USAGE

crypto

ID_TYPE

disk

SUBSYSTEM

block

Blank CDs and DVDs

Udev property

Value

ID_CDROM_MEDIA_STATE

blank

ID_CDROM_MEDIA_CD_R

1

Multimedia

Audio CDs

Udev property

Value

DKD_MEDIA_AVAILABLE

1

ID_CDROM_MEDIA_TRACK_COUNT_AUDIO

>0

ID_CDROM_MEDIA

1

DVDs

Udev property

Value

DKD_MEDIA_AVAILABLE

1

ID_CDROM_DVD

1

ID_CDROM_MEDIA

1

ID_CDROM_MEDIA_TRACK_COUNT

>0

Blue-ray Disks

Video CDS

Portable Music Players

Some portable music players can be identified using the following udev properties:

Udev property

Value

DKD_PRESENTATION_ICON_NAME

multimedia-player

ID_MEDIA_PLAYER

Others have to be mounted like mass storage devices first. Afterwards, an investigation
of their file system is necessary. Here's a list of special music folders of certain
devices:

Device

Music folder

iPod Nano 3rd Generation

iPod_Control/Music

Note: this folder is typically present on an iPod even if it is reflashed with Rockbox. The difference between the original and reflashed iPods is that the original iPod needs special directory hierarchy and a special database file maintained by libgpod, and Rockbox plays anything from any directory without the need to install special programs. Rockbox can be detected by the presence of the .rockbox folder.

Cameras

Some cameras can be identified by special gphoto2 and probably PTP properties:

Udev property

Value

ID_GPHOTO2

1

GPHOTO2_DRIVER

Cameras not supporting this are usually represented as mass storage devices. Our
only chance to distinguish them from normal mass storage devices is via special
folders like:

DCIM

dcim

iPod_Control/Photos

…?

PDAs

Palms

Pocket PCs

Printers

USB printers

Udev property

Value

DRIVER

usblp

Input Devices

Keyboards

Udev property

Value

ID_CLASS

kbd

ID_TYPE

hid

SUBSYSTEM

input

Mice

Udev property

Value

ID_CLASS

mouse

ID_TYPE

hid

SUBSYSTEM

input

Tablets

Wacom Tablets

Udev property

Value

DRIVER

wacom

or (Volito 2, Bamboo)

Udev property

Value

ID_USB_DRIVER

wacom

Genius Tablets (e.g. W8060U)

Udev property

Value

ID_CLASS

mouse

ID_TYPE

hid

SUBSYSTEM

input

ID_MODEL

…(T/t)ablet…

Other devices

Sound cards

Udev property

Value

ID_TYPE

audio

SUBSYSTEM

sound

Webcams

Udev property

Value

SUBSYSTEM

video4linux

Smartphones (not in mass storage mode)

Nokia

Udev property

Value

DRIVER

cdc_phonet

Sony

Udev property

Value

DRIVER

cdc_amn

Order in which devices are checked

thunar-volman with HAL

Bold means: implemented in the new thunar-volman version based on udev/GIO.