I finally got automounting working with the karma.  Here's how.

To start, a couple of gotchas:
- Uses gnome and so forth.  autofs might be an easier route for the
  non-gui set
- I recently switched from Debian to Ubuntu on my laptop.  The HAL that 
  ships with Dapper seems to have a limitless supply of bugs.  I
  upgraded to Edgy and everything is working better.

Ok, so the pieces are:
sysfs(kernel) -> udev (userspace device monitor) 
-> dbus (message communication between all pieces)
-> hal (sets properties and policy based on udev devices)
-> gnome-volume-manager (automounts according to policy) 
-> pmount-hal (mounts disks).

g-v-m wants the device to at least have its volume.fstype set to
something (omfs) and volume.fsusage to 'filesystem'.  In addition I used
bits of julien's policy files to specify that g-v-m should mount it.

1. put the attached 20-rio-karma.fdi in your /etc/hal/fdi/information 
directory and preferences.fdi in /etc/hal/fdi/policy (your path may
vary).  

2. g-v-m appears to ignore the filesystem type so add this to fstab to 
make pmount-hal work...

/dev/disk/by-id/usb-Rio_Rio_Karma_0000000000000000-part2    /media/karma    
omfs    user,noauto    0   0

3. Now Restart dbus, hal, g-v-m, and plug it in.  If nothing happens,
check the output from lshal.  You should see portable_audio_player_type 
set to 'karma' on the device, along with volume.fstype on the second 
partition set to 'omfs' and its volume.policy.desired_mount_point set 
to 'karma'. 

If all else fails run gnome-volume-manager -n in a terminal to debug 
things.

The above Works For Me but I do get two icons for the karma instead of
just one.  If anyone figures that out let me know.
-- 
Bob Copeland %% www.bobcopeland.com 
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 

<deviceinfo version="0.2">
  <device>
    <match key="info.category" string="storage">
      <match key="@storage.physical_device:info.bus" string="usb">
        <!-- Rio Karma -->
        <match key="@storage.physical_device:usb.vendor_id" int="0x045a">
          <match key="@storage.physical_device:usb.product_id" int="0x5210">
            <append key="info.capabilities" 
type="strlist">portable_audio_player</append>
            <merge key="info.category" 
type="string">portable_audio_player</merge>
            <merge key="storage.removable" type="bool">true</merge>
            <merge key="storage.requires_eject" type="bool">true</merge>
            <merge key="portable_audio_player.type" type="string">karma</merge>
            <merge key="portable_audio_player.access_method" 
type="string">storage</merge>
            <merge key="portable_audio_player.storage_device" 
type="copy_property">info.udi</merge>
            <append key="portable_audio_player.output_formats" 
type="strlist">audio/mpeg</append>
            <append key="portable_audio_player.output_formats" 
type="strlist">audio/x-ms-wma</append>
            <append key="portable_audio_player.output_formats" 
type="strlist">application/ogg</append>
            <append key="portable_audio_player.input_formats" 
type="strlist">audio/x-wav</append>
          </match>
        </match>
    </match>
    </match>
  </device>
  <device>
    <match key="info.udi" 
string="/org/freedesktop/Hal/devices/volume_part2_size_19919976960">
        <merge key="volume.fstype" type="string">omfs</merge>
        <merge key="volume.fsusage" type="string">filesystem</merge>
    </match>
  </device>
</deviceinfo>
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>
    <match key="info.udi" 
string="/org/freedesktop/Hal/devices/storage_serial_Rio_Rio_Karma_0000000000000000">
      <merge key="storage.policy.should_mount" type="bool">true</merge>
      <merge key="storage.policy.is_removable" type="bool">true</merge>
      <merge key="storage.policy.default.mount_root" 
type="string">/media</merge>
    </match>
</device>

<device>
    <match key="info.udi" 
string="/org/freedesktop/Hal/devices/volume_part2_size_19919976960">
      <merge key="volume.policy.desired_mount_point" type="string">karma</merge>
      <merge key="volume.policy.mount_filesystem" type="string">omfs</merge>
      <merge key="volume.fsusage" type="filesystem">omfs</merge>
    </match>
</device>
</deviceinfo>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel

Reply via email to