Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ivman stopped working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Tue Jan 27, 2009 11:46 pm    Post subject: ivman stopped working Reply with quote

Hi.

My ivman suddenly stopped working with no apparent reason. It shows no activity if I run it with -d --nofork and insert USB drive. However it detects and mounts the drive if I run it after inserting the device. Dmesg shows that device is detected, lshal lists it. Running ivman as system/user, restarting hal and dbus gives no positive results. Looks like hal doesn't send appropriate events, but how can I check it?
_________________
/KoS
Back to top
View user's profile Send private message
ultrabug
Developer
Developer


Joined: 24 Jan 2005
Posts: 698
Location: Paris

PostPosted: Wed Feb 04, 2009 11:24 am    Post subject: Reply with quote

Got the exact same problem. Did you find a solution ?
Back to top
View user's profile Send private message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Wed Feb 04, 2009 10:29 pm    Post subject: Reply with quote

Nope.
"dbus-monitor --system" shows some activity when I add/remove devices, as does "hald --verbose=yes --damon=no".
Both system and user ivman instances stay silent..
Tried to rebuild the whole system - no luck.
_________________
/KoS
Back to top
View user's profile Send private message
ultrabug
Developer
Developer


Joined: 24 Jan 2005
Posts: 698
Location: Paris

PostPosted: Thu Feb 05, 2009 8:32 am    Post subject: Reply with quote

Yeah same.. so I went into writing udev rules combined with autofs instead. Still odd that ivman stopped like this.
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 384
Location: Europe/Austria

PostPosted: Thu Feb 05, 2009 10:19 am    Post subject: Reply with quote

Ivman is discontinued afaik.
Probably a new version of dbus and/or hal did break something.

There is a kind of replacement called hal-evt.
Anyone checked this out?

I'm working with udev-rules and pmount command atm, but it would be better if it could be unmounted manually (won't work because udev makes no fstab entries - so no umount for users).
Back to top
View user's profile Send private message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Thu Feb 05, 2009 10:26 pm    Post subject: Reply with quote

OK, now we need hal-evt ebuild :)
_________________
/KoS
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Feb 06, 2009 6:54 pm    Post subject: Reply with quote

kos wrote:
OK, now we need hal-evt ebuild :)
I'll write an ebuild for hal-evt and boolstuff (dependancy) and post back soon.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Feb 06, 2009 7:18 pm    Post subject: Reply with quote

That was a lot easier than I expected. The ebuilds were simple to write. I'm not exactly sure on the usage for halevt yet however. Once we get things figured out and see that it is working, I'll submit them to bugzilla.

dev-libs/boolstuff/boolstuff-0.1.12.ebuild
Code:

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="A C++ library that supports a few operations on boolean expression binary trees."
HOMEPAGE="http://perso.b2b2c.ca/sarrazip/dev/boolstuff.html"
SRC_URI="http://perso.b2b2c.ca/sarrazip/dev/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""

DEPEND=""
RDEPEND=""


src_unpack() {
    unpack ${P}.tar.gz
}



src_compile() {
    einfo "Running configure"
    econf || die "econf failed"

    einfo "Building ${P}"
    emake || die "emake failed"
}

src_install () {
    einfo "Running make install"
    emake DESTDIR="${D}" install || die "install failed"
}




sys-apps/halevt/halevt-0.1.4.ebuild
Code:

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="A daemon built on ivman that executes arbitrary commands on HAL events"
HOMEPAGE="http://www.environnement.ens.fr/perso/dumas/halevt.html"
SRC_URI="http://www.environnement.ens.fr/perso/dumas/halevt-download/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""

DEPEND=">=sys-apps/hal-0.5.11-r1
        >=sys-apps/dbus-1.2.3-r1
        >=dev-libs/dbus-glib-0.76
        >=dev-libs/glib-2.16.5
        >=dev-libs/boolstuff-0.1.12"
RDEPEND=""


src_unpack() {
    unpack ${P}.tar.gz
}



src_compile() {
    einfo "Running configure"
    econf || die "econf failed"

    einfo "Building ${P}"
    emake || die "emake failed"
}

src_install () {
    einfo "Running make install"
    emake DESTDIR="${D}" install || die "install failed"
}



Last edited by mikegpitt on Sat Feb 07, 2009 5:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Feb 06, 2009 7:58 pm    Post subject: Reply with quote

I submitted the ebuilds to bugzilla:
https://bugs.gentoo.org/show_bug.cgi?id=257933

So far things are working great. You can launch halevt with the -f option to see what it actually happening. So far it automounts my usb sticks and cdrom witout any additional configuration!
Code:
halevt -f

One trick... you need to remove the entries in your /etc/fstab for halevt to work properly... for instance if you have an entry for /dev/cdrom halevt will throw an error that permission to mount is denied.
Back to top
View user's profile Send private message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Sat Feb 07, 2009 7:45 am    Post subject: Reply with quote

Thank you, works fine so far. Please add ~amd64 to the keywords :)
_________________
/KoS
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Sat Feb 07, 2009 5:07 pm    Post subject: Reply with quote

kos wrote:
Thank you, works fine so far. Please add ~amd64 to the keywords :)
Done... see above.
Back to top
View user's profile Send private message
smlgbl
Guru
Guru


Joined: 10 Feb 2005
Posts: 305

PostPosted: Fri Feb 13, 2009 6:34 pm    Post subject: Reply with quote

Wow, finally there is a solution for this...and it works exactly how I had ivman configured.
Is there an option to make it run in like "system-mode", so that it is started even without a user being logged in? Kind of the way ivman was intended when run without a user instance (at least according to the man page).
Thanks for this work!
_________________
samuel.
'Do not let one girding on boast about himself like one unfastening'
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Feb 13, 2009 6:46 pm    Post subject: Reply with quote

smlgbl wrote:
Wow, finally there is a solution for this...and it works exactly how I had ivman configured.
Is there an option to make it run in like "system-mode", so that it is started even without a user being logged in? Kind of the way ivman was intended when run without a user instance (at least according to the man page).
Thanks for this work!
I guess it's possible to create an init script to start halevt as root... the only issue I see with this is that some of the mounted devices may not be user accessible. I always had that problem with ivman, so I started it as my user instead of root.

I can add the init script to the ebuild, to make it more similar to how gentoo configures ivman. I will also have it create a user/group halevt, since it seems like from the man page it will sometimes want to use those defaults.

Will post it later when I get a chance to edit it...

I should also probably start a new thread for this in unsupported software, since the halevt ebuild is kind of hijacking this thread....
Back to top
View user's profile Send private message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Fri Feb 13, 2009 10:43 pm    Post subject: Reply with quote

I guess you can start it from an init script specifying -g <your gid> -u <your uid>

BTW it's very easy to hack ivman-launch script to work with halevt, I use it to start/stop halevt together with my X session.
_________________
/KoS
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Feb 20, 2009 8:43 pm    Post subject: Reply with quote

Sorry I haven't gotten around to posting the new ebuild... I started working on it last week, but ran into a glitch, and put it on the back burner.

Anyway, I'm having an issue with halevt and autorunning DVD's. For some reason my autorun command executes no matter what type of disc is inserted. Is this a bug with halevt or my rule? See my simple config below:

Code:
<?xml version="1.0" encoding="UTF-8"?>
     <halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">

     <halevt:Device match="hal.volume.disc.is_videodvd">
            <halevt:Insertion exec="/usr/bin/xine --auto-play --auto-scan dvd"/>
     </halevt:Device>

</halevt:Configuration>



EDIT2: The problem wasn't halevt but my terrible config. I did a lot of testing and looking though the hal event documentation and I found solutions to the issues... I can post more details later when I'm in front of my laptop.


EDIT: Either I'm greatly messing up my configuration, or halevt isn't working properly. I was just writing another rule to pop up a notification if a usb stick is inserted into the machine. This also gets executed when a CD-ROM is inserted. Here's the rule:
Code:
<halevt:Device match="hal.block.device &amp; hal.block.is_volume = true" value="usb">
             <halevt:Property name="hal.volume.is_mounted">
                <halevt:Action value="true" exec="xmessage 'USB Storage: $hal.volume.mount_point$ -- $hal.volume.label$'"/>
             </halevt:Property>
          </halevt:Device>
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Wed Feb 25, 2009 9:32 pm    Post subject: Reply with quote

As a follow up to my last post, here are some useful things I configured for halevt. There are probably better ways to do these things, but these seem to work. Most of these will just execute a dummy command with xmessage to list some useful data after the event occurs.

file: ~/.halevt/HalevtConfigActions.xml
Code:

<?xml version="1.0" encoding="UTF-8"?>
     <halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">

        <!--
             Useful links:
             http://people.freedesktop.org/~david/hal-spec/hal-spec.html
             http://www.environnement.ens.fr/perso/dumas/halevt-doc/halevt.html
        -->


     <!-- DVD autoplay -->

     <halevt:Device match="hal.volume.disc.is_videodvd = true">
                <halevt:Insertion exec="xine --auto-play --auto-scan dvd"/>
     </halevt:Device>


     <!-- CD-ROM insertion -->

     <halevt:Device match="hal.volume.disc.is_videodvd = false">
                <halevt:Insertion exec="xmessage 'Inserted CD-ROM: $hal.volume.mount_point$ - $hal.volume.label$'"/>
     </halevt:Device>


     <!-- CD-ROM mounted -->

     <halevt:Device match="hal.volume.disc.is_videodvd = false">
             <halevt:Property name="hal.volume.is_mounted">
                <halevt:Action value="true" exec="xmessage 'CD-ROM Mounted: $hal.volume.mount_point$ - $hal.volume.label$'"/>
             </halevt:Property>
     </halevt:Device>


          <!-- CDROM Unmount -->

     <halevt:Device match="hal.volume.disc.is_videodvd = false">
             <halevt:Property name="hal.volume.is_mounted">
                <halevt:Action value="false" exec="xmessage 'CD-ROM Unmounted: $hal.volume.mount_point$ - $hal.volume.label$'"/>
             </halevt:Property>
     </halevt:Device>


     <!-- USB drive inserted -->

     <halevt:Device match="hal.storage.bus = usb">
                <halevt:Insertion exec="xmessage 'USB Storage: $hal.volume.mount_point$ - $hal.volume.label$'"/>
     </halevt:Device>



     <!-- USB drive mounted -->

     <halevt:Device match="hal.volume.is_disc = false">
             <halevt:Property name="hal.volume.is_mounted">
                <halevt:Action value="true" exec="xmessage 'USB Storage mounted: $hal.volume.mount_point$ - $hal.volume.label$'"/>
             </halevt:Property>
     </halevt:Device>



          <!-- USB Unmount -->

     <halevt:Device match="hal.volume.is_disc = false">
             <halevt:Property name="hal.volume.is_mounted">
                <halevt:Action value="false" exec="xmessage 'USB Storage Unmounted: $hal.volume.mount_point$ - $hal.volume.label$'"/>
             </halevt:Property>
     </halevt:Device>


</halevt:Configuration>


Back to top
View user's profile Send private message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Fri Feb 27, 2009 7:04 am    Post subject: Reply with quote

Here are mine configs. Work quite well.

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE halevt:Configuration [

<!-- this entity corresponds with mountable devices, which have
 volume.policy.should_mount true or don't have
 volume.policy.should_mount false and are block devices hotpluggable or
 removable.
-->
<!ENTITY MOUNTABLE "hal.block.device &amp; hal.block.is_volume = true &amp; (hal.volume.policy.should_mount = true | ((! hal.volume.policy.should_mount = false) &amp; (hal.block.storage_device.hal.storage.policy.should_mount = true | ((! hal.block.storage_device.hal.storage.policy.should_mount = false)  &amp; (hal.block.storage_device.hal.storage.hotpluggable = true | hal.block.storage_device.hal.storage.removable = true)))))">
]>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">

   <!-- audio CD -->
   <halevt:Device match="hal.block.is_volume &amp; hal.volume.disc.type=cd_rom &amp; hal.volume.disc.has_audio=true &amp; hal.volume.disc.has_data=false">
      <halevt:Insertion exec="grip"/>
   </halevt:Device>

   <!-- blank CD/DVD -->
   <halevt:Device match="hal.block.is_volume &amp; hal.volume.is_disc=true &amp; hal.volume.disc.is_blank=true">
      <halevt:Insertion exec="k3b"/>
   </halevt:Device>
   
   <!--
   This rule matches removable devices which have volume.policy.should_mount true
   or don't have volume.policy.should_mount false.
   Upon insertion, they are mounted and recorded by halevt-mount.
   -m 002 sets the umask of mount to 002 when pmount is used system-wide
   to mount the device. This allows regular users to read the device.
   !-->
   <halevt:Device match="&MOUNTABLE; &amp; (!hal.volume.is_disc | hal.volume.is_disc=false)">
      <halevt:Insertion exec="halevt-mount -u $hal.udi$ -o codepage=866,iocharset=koi8-r -m 002"/>
   </halevt:Device>
   <halevt:Device match="&MOUNTABLE; &amp; hal.volume.is_disc=true">
      <halevt:Insertion exec="halevt-mount -u $hal.udi$ -o iocharset=koi8-r -m 002"/>
   </halevt:Device>

   <!--
   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 &amp; hal.block.is_volume = true &amp; hal.volume.mount_point">
      <halevt:Property name="hal.volume.is_mounted">
         <halevt:Action value="true" exec="halevt-mount -s"/>
      </halevt:Property>
   </halevt:Device>

   <!--
   When a device is unmounted, it is recorded by halevt-mount.
   !-->
   <halevt:Device match="hal.block.device &amp; hal.block.is_volume = true">
      <halevt:Property name="hal.volume.is_mounted">
         <halevt:Action value="false" exec="halevt-mount -s"/>
      </halevt:Property>
   </halevt:Device>

   <!--
   When a device is removed, it is recorded by halevt-mount.
   Note that at that point the device is already out of hal, so we use
   * which matches any device in the match attribute, and only pass the
   udi to the command.
   !-->
   <halevt:Device match="hal.*">
      <halevt:Removal exec="halevt-umount -u $hal.udi$; halevt-umount -s"/>
   </halevt:Device>


   <!--
   Example of a use of OnInit. At startup all the devices are matched and the exec
   comand is run for those that match. Here we match all the removable devices
   that aren't already mounted and mount and register them.
   !-->

   <halevt:Device match="&MOUNTABLE; &amp; (!hal.volume.is_disc | hal.volume.is_disc=false)">
      <halevt:OnInit exec="halevt-mount -u $hal.udi$ -o codepage=866,iocharset=koi8-r -m 002"/>
   </halevt:Device>
   <halevt:Device match="&MOUNTABLE; &amp; hal.volume.is_disc=true">
      <halevt:OnInit exec="halevt-mount -u $hal.udi$ -o iocharset=koi8-r -m 002"/>
   </halevt:Device>
</halevt:Configuration>


Notifications:
Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE halevt:Configuration [

<!-- this entity corresponds with mountable devices, which have
 volume.policy.should_mount true or don't have
 volume.policy.should_mount false and are block devices hotpluggable or
 removable.
-->
<!ENTITY MOUNTABLE "hal.block.device &amp; hal.block.is_volume = true &amp; (hal.volume.policy.should_mount = true | ((! hal.volume.policy.should_mount = false) &amp; (hal.block.storage_device.hal.storage.policy.should_mount = true | ((! hal.block.storage_device.hal.storage.policy.should_mount = false)  &amp; (hal.block.storage_device.hal.storage.hotpluggable = true | hal.block.storage_device.hal.storage.removable = true)))))">
]>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">

   <halevt:Device match="hal.info.category=storage">
      <halevt:Insertion exec="notify-send -i &quot;/usr/kde/3.5/share/icons/crystalsvg/48x48/devices/usbpendrive_unmount.png&quot; &quot;Storage device detected&quot; &quot;$hal.info.product$&quot;"/>
      <halevt:Removal exec="notify-send -i &quot;/usr/kde/3.5/share/icons/crystalsvg/48x48/devices/usbpendrive_unmount.png&quot; &quot;Storage device removed&quot; &quot;$hal.info.product$&quot;"/>
   </halevt:Device>
   <halevt:Device match="hal.linux.subsystem=usb">
      <halevt:Insertion exec="notify-send -i &quot;/home/kos/.kde3.5/share/icons/Noia KDE 0.95/48x48/apps/usb.png&quot; &quot;USB device detected&quot; &quot;$hal.info.product$&quot;"/>
      <halevt:Removal exec="notify-send -i &quot;/home/kos/.kde3.5/share/icons/Noia KDE 0.95/48x48/apps/usb.png&quot; &quot;USB device removed&quot; &quot;$hal.info.product$&quot;"/>
   </halevt:Device>
   
   <!-- audio CD -->
   <halevt:Device match="hal.block.is_volume &amp; hal.volume.disc.type=cd_rom &amp; hal.volume.disc.has_audio=true &amp; hal.volume.disc.has_data=false">
      <halevt:Insertion exec="notify-send -i &quot;/usr/share/icons/oxygen/48x48/devices/media-optical-audio.png&quot; &quot;Audio CD inserted&quot; &quot;$hal.volume.label$&quot;"/>
   </halevt:Device>

   <!-- blank CD/DVD -->
   <halevt:Device match="hal.block.is_volume &amp; hal.volume.is_disc=true &amp; hal.volume.disc.is_blank=true">
      <halevt:Insertion exec="notify-send -i &quot;/usr/share/icons/oxygen/48x48/devices/media-optical-recordable.png&quot; &quot;Blank recordable disc inserted&quot; &quot;$hal.block.storage_device$&quot;"/>
   </halevt:Device>
   
   <halevt:Device match="&MOUNTABLE;">
      <halevt:Insertion exec="notify-send -i &quot;/usr/share/icons/oxygen/48x48/devices/drive-removable-media-usb.png&quot; &quot;Mountable device inserted&quot; &quot;$hal.info.product$&quot;"/>
      <halevt:Removal exec="notify-send -i &quot;/usr/share/icons/oxygen/48x48/devices/drive-removable-media-usb.png&quot; &quot;Mountable device removed&quot; &quot;$hal.info.product$&quot;"/>
   </halevt:Device>

   <!-- open mounted device -->
   <halevt:Device match="&MOUNTABLE;">
      <halevt:Property name="hal.volume.is_mounted">
         <halevt:Action value="true" exec="/home/kos/bin/open_mounted_device.sh &quot;$hal.volume.mount_point$&quot;"/>
      </halevt:Property>
   </halevt:Device>
</halevt:Configuration>


open_mounted_device.sh starts a file manager.
_________________
/KoS
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Sat Apr 11, 2009 4:17 am    Post subject: Reply with quote

Is halevt the way to go? I might as well unmerge ivman as it's useless in it's current form.

I gather it's not in portage yet.

Is there any other alternative that is available in portage now?
_________________
...Lyall
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Apr 13, 2009 2:30 pm    Post subject: Reply with quote

lyallp wrote:
Is halevt the way to go? I might as well unmerge ivman as it's useless in it's current form.

I gather it's not in portage yet.

Is there any other alternative that is available in portage now?
I stopped using ivman and have switched over to halevt for a few months now. Overall I've had less problems with halevt than I had with ivman in the past.

You are correct halevt isn't in portage yet, but the ebuild is in bugzilla.
Back to top
View user's profile Send private message
yank74
n00b
n00b


Joined: 08 Nov 2005
Posts: 22

PostPosted: Fri Apr 24, 2009 2:55 pm    Post subject: Reply with quote

Hi

halevt seems to work fine for me but i don't understand how to set the mounted directory writable by the world???

here is how i run it (in the init file) : /usr/bin/halevt -u root -g plugdev -c /etc/halevt/halevt.xml

i use the default config file and my user is in the plugdev group.

Issue is a directory writable by root and its group root :(

$ls -alp /media
$drwxrwxr-x 6 root root 16384 janv. 1 1970 disk/

Thanks
Back to top
View user's profile Send private message
KrissN
n00b
n00b


Joined: 25 Sep 2004
Posts: 54
Location: Kedzierzyn-Kozle@Poland

PostPosted: Wed Apr 29, 2009 8:42 pm    Post subject: Reply with quote

I also got halevt working nicely for me with KDE 4.2.

In case someone is interested, here's my config (simple auto-mounting + cdrom eject button handling):

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE halevt:Configuration [
    
     <!-- this entity corresponds with mountable devices, which have
          volume.policy.should_mount true or don't have
          volume.policy.should_mount false and are block devices hotpluggable or
          removable.
       -->
     <!ENTITY MOUNTABLE "hal.block.device &amp; hal.block.is_volume = true &amp; (hal.volume.policy.should_mount = true | ((! hal.volume.policy.should_mount = false) &amp; (hal.block.storage_device.hal.storage.policy.should_mount = true | ((! hal.block.storage_device.hal.storage.policy.should_mount = false)  &amp; (hal.block.storage_device.hal.storage.hotpluggable = true | hal.block.storage_device.hal.storage.removable = true)))))">
     ]>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">
 
  <!--
     Remember to use &amp; and &quot; for & and " in xml attributes.
                  
     In a match attribute, hal.* is special since it matches any device.
     In a match attribute property it is possible to refer to other
     device properties. For example
     hal.block.storage_device.hal.storage.policy.should_mount
     refers to the storage.policy.should_mount property of the block.storage_device
     device associated with a given device.
     
     In an exec attribute, $hal.udi$ is special since it is replaced by
     the device udi. $hal.some.property$ is replaced by the value
     of the property some.property.
     !-->
     
  <!-- Removable devices support !-->
 
  <!--
     This rule matches removable devices which have volume.policy.should_mount true
     or don't have volume.policy.should_mount false.
     Upon insertion, they are mounted using KDE4's Solid framework
     !-->
  <halevt:Device match="&MOUNTABLE;">
    <halevt:Insertion exec="solid-hardware mount $hal.udi$"/>
  </halevt:Device>
 
 
  <!-- CD-ROM ejection support !-->
 
  <!--
     This rule matches cdrom drives. When the eject button on the cdrom is pressed,
     the disc is ejected using KDE4's Solid framework.
     !-->
  <halevt:Device match="hal.storage.drive_type = cdrom">
    <halevt:Condition name="EjectPressed" exec="solid-hardware eject $hal.udi$"/>
  </halevt:Device>
 
     
</halevt:Configuration>


Halevt can be added to the list of automatically started applications using System Settings to make it start as user during KDE startup.

This script needs kde-base/solid-hardware to be installed.
_________________
We try making things idiot-proof and someone will just go and build a better idiot.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Jun 01, 2009 7:40 pm    Post subject: Reply with quote

I wanted to let you all know that halevt is now in the portage tree!
Back to top
View user's profile Send private message
kos
n00b
n00b


Joined: 28 May 2003
Posts: 71
Location: Mountain View, CA

PostPosted: Mon Sep 07, 2009 2:13 pm    Post subject: Reply with quote

ebuild for 0.1.5 anyone? :)
_________________
/KoS
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum