Differences between revisions 3 and 4
Revision 3 as of 2007-06-28 13:51:00
Size: 3802
Editor: MikeOConnor
Comment: ivman is no longer only available in unstable
Revision 4 as of 2009-03-16 03:30:05
Size: 3820
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The description from their [http://ivman.sf.net homepage]: The description from their [[http://ivman.sf.net|homepage]]:
Line 9: Line 9:
["IVMan"] is a good alternative GnomeVolumeManager for people that don't run ["Gnome"]. Ivman can be run as a system daemon, or as a user, or both. If it is being run as a system daemon, its behavior will use the [#config config files] located in /etc/ivman. When it is being run as a user, it will use the [#config config files] in $HOME/.ivman/. The first time a user starts ivman, a default set of [#config config files] will be created in $HOME/.ivman/. [[IVMan]] is a good alternative GnomeVolumeManager for people that don't run [[Gnome]]. Ivman can be run as a system daemon, or as a user, or both. If it is being run as a system daemon, its behavior will use the [[#config|config files]] located in /etc/ivman. When it is being run as a user, it will use the [[#config|config files]] in $HOME/.ivman/. The first time a user starts ivman, a default set of [[#config|config files]] will be created in $HOME/.ivman/.
Line 11: Line 11:
[[Anchor(config)]] <<Anchor(config)>>
Line 13: Line 13:
 * [#ivmconfigbase IvmConfigBase.xml] is used for options that affect the running of ivman.
 * [#ivmconfigactions IvmConfigActions.xml] specifies actions to be performed by ivman.
 * [#ivmconfigconditions IvmConfigConditions.xml] specifies actions to take when conditions are emitted by devices.
 * [#ivmconfigproperties IvmConfigProperties.xml] specifies actions to take when proprties of devices change.
 * [[#ivmconfigbase|IvmConfigBase.xml]] is used for options that affect the running of ivman.
 * [[#ivmconfigactions|IvmConfigActions.xml]] specifies actions to be performed by ivman.
 * [[#ivmconfigconditions|IvmConfigConditions.xml]] specifies actions to take when conditions are emitted by devices.
 * [[#ivmconfigproperties|IvmConfigProperties.xml]] specifies actions to take when proprties of devices change.
Line 18: Line 18:
[[Anchor(automounting)]] <<Anchor(automounting)>>
Line 21: Line 21:
ivman will automount removable volumes for you using ["PMount"] when it is notified by ["HAL"] that they are attached provided that you have set the should_mount policy in ["HAL"]. By default, ["HAL"] will have should_mount set to false. If you wish to change this, the recommended way is to edit /etc/hal/fdi/policy/preferences.fdi and add a section like this: ivman will automount removable volumes for you using [[PMount]] when it is notified by [[HAL]] that they are attached provided that you have set the should_mount policy in [[HAL]]. By default, [[HAL]] will have should_mount set to false. If you wish to change this, the recommended way is to edit /etc/hal/fdi/policy/preferences.fdi and add a section like this:
Line 45: Line 45:
[[Anchor(ivmconfigproperties)]] <<Anchor(ivmconfigproperties)>>
Line 50: Line 50:
When ivman is notified by ["HAL"] that the property of a device has changed. If any of the rules in this config file match the property which has changed, the specified action will be performed. When ivman is notified by [[HAL]] that the property of a device has changed. If any of the rules in this config file match the property which has changed, the specified action will be performed.
Line 61: Line 61:
With this in your [#ivmconfigproperties IvmConfigProperties.xml], anytime a volume is mounted, (that is, ["HAL"]'s "is_mounted" property changes), ivman will search on the mounted volume for a keys/ssh/id_dsa file, and if it exists, prompt the user for the ssh-key's passphrase and add it to ssh-agent. This will only work when run as a user, since this requires the DISPLAY, SSH_AGENT_PID an SSH_AUTH_SOCK environment variables to be set. With this in your [[#ivmconfigproperties|IvmConfigProperties.xml]], anytime a volume is mounted, (that is, [[HAL]]'s "is_mounted" property changes), ivman will search on the mounted volume for a keys/ssh/id_dsa file, and if it exists, prompt the user for the ssh-key's passphrase and add it to ssh-agent. This will only work when run as a user, since this requires the DISPLAY, SSH_AGENT_PID an SSH_AUTH_SOCK environment variables to be set.

ivman is "Ikke's Volume Manager".

The description from their homepage:

Ivman is a generic handler for HAL events. Originally for [#automounting], it can now be used to run arbitrary commands when events or conditions occur or properties are modified on your hardware (e.g., run a command when you close your laptop's lid, run a command when a particular device is attached or a particular CD is inserted, etc).

IVMan is a good alternative ?GnomeVolumeManager for people that don't run Gnome. Ivman can be run as a system daemon, or as a user, or both. If it is being run as a system daemon, its behavior will use the config files located in /etc/ivman. When it is being run as a user, it will use the config files in $HOME/.ivman/. The first time a user starts ivman, a default set of config files will be created in $HOME/.ivman/.

Config Files

Auto Mounting

ivman will automount removable volumes for you using ?PMount when it is notified by ?HAL that they are attached provided that you have set the should_mount policy in ?HAL. By default, ?HAL will have should_mount set to false. If you wish to change this, the recommended way is to edit /etc/hal/fdi/policy/preferences.fdi and add a section like this:

  <device>
    <!-- Whitelist bus types of storage devices we care about  -->
    <match key="info.category" string="storage">
      <match key="storage.bus" string="usb">
        <merge key="storage.policy.should_mount" type="bool">true</merge>      
      </match>
      <match key="storage.bus" string="ide">
        <merge key="storage.policy.should_mount" type="bool">true</merge>
      </match>
      <match key="storage.bus" string="ieee1394">
        <merge key="storage.policy.should_mount" type="bool">true</merge>
      </match>
      <match key="storage.bus" string="sata">
        <merge key="storage.policy.should_mount" type="bool">true</merge>
      </match>
      <match key="storage.bus" string="platform">
        <merge key="storage.policy.should_mount" type="bool">true</merge>
      </match>
    </match>
 </device> 

IvmConfigProperties.xml

The syntax of ?IvmConfigProperties.xml is detailed in the ?IvmConfigProperties.xml(5) manpage.

When ivman is notified by ?HAL that the property of a device has changed. If any of the rules in this config file match the property which has changed, the specified action will be performed.

Look at the following snippet from ?IvmConfigProperties.xml as an example:

    <ivm:Match name="hal.info.category" value="volume">
          <ivm:Property name='hal.volume.is_mounted'>
                <ivm:Action value="true" exec="SSH_ASKPASS=ssh-askpass /usr/bin/ssh-add $hal.volume.mount_point$/keys/ssh/id_dsa" />
        </ivm:Property>>
   </ivm:Match>

With this in your IvmConfigProperties.xml, anytime a volume is mounted, (that is, ?HAL's "is_mounted" property changes), ivman will search on the mounted volume for a keys/ssh/id_dsa file, and if it exists, prompt the user for the ssh-key's passphrase and add it to ssh-agent. This will only work when run as a user, since this requires the DISPLAY, SSH_AGENT_PID an SSH_AUTH_SOCK environment variables to be set.