Auto-mounting USB keys and disks

I use HAL/IVMAN to mount CD-roms, DVD’s, and Music-CD-s by setting the following in ~/.ivman/IvmConfigBase.xml:

line 24: change "ivman" to "haldaemon" for user value. 

~/.ivman/IvmConfigActions.xml:

Add (for music CDs):     

<ivm:Match name="hal.volume.disc.has_audio" value="true">
    <ivm:Match name="hal.volume.disc.has_data" value="false">
        <ivm:Option name="exec" value="/usr/bin/vlc cdda:///dev/scd0 2&gt;/tmp/ivman.out" />
    </ivm:Match>
</ivm:Match>

Add (for DVDs):

<ivm:Match name="hal.volume.disc.is_videodvd" value="true">
    <ivm:Option name="exec" value="/usr/bin/vlc dvd:// 2&gt;/tmp/ivman.out" />
</ivm:Match>

For USB keys and disks (got from here:  http://www.gentoo-wiki.info/Ivman)

Create file &quot;/etc/hal/fdi/policy/mountpolicies.fdi&quot; containing: 

<deviceinfo version="0.2">
    <device>
        <match key="info.category" string="storage">
            <match key="storage.hotpluggable" bool="true">
                <merge key="storage.policy.should_mount" type="bool">true</merge>
            </match>
        </match>
    </device>
</deviceinfo>
 

Advertisements

Feel Free to Comment (Name/Email/Website optional):

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: