Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#1
I've been messing around with the halevt configuration file. One helpful did bit I've picked up is how to automatically open a rox-filer session to a just inserted usb device. Still learning, but here you go for those interest.

in /etc/halevt/halevt.xml, find this section

Code: Select all

When a device get a mount point, it is passed to halevt-mount which can 
record it. The property that changes is volume.is_mounted, and the action is
executed when the value of volume.is_mounted becomes true.
!-->
<halevt:Device match="hal.block.device & hal.block.is_volume = true & hal.volume.mount_point">
   <halevt:Property name="hal.volume.is_mounted">
      <halevt:Action value="true" exec="halevt-mount -s"/>
   </halevt:Property>
</halevt:Device>
and add this line

Code: Select all

 <halevt:Action value="true" exec='rox"$hal.volume.mount_point$"'/>
just before /halevt:Property. This will open a rox window for the usb drive volume you just mounted.

The section should now look like this.

Code: Select all

When a device get a mount point, it is passed to halevt-mount which can 
record it. The property that changes is volume.is_mounted, and the action is
executed when the value of volume.is_mounted becomes true.
!-->
<halevt:Device match="hal.block.device & hal.block.is_volume = true & hal.volume.mount_point">
   <halevt:Property name="hal.volume.is_mounted">
      <halevt:Action value="true" exec="halevt-mount -s"/>
      <halevt:Action value="true" exec='rox"$hal.volume.mount_point$"'/>
   </halevt:Property>
</halevt:Device>