How to setup persistent property?

View: New views
3 Messages — Rating Filter:   Alert me  

How to setup persistent property?

by Christophe Lohr-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
  For my Xorg, I have to setup following property regarding my usb mouse:
hal-set-property --udi
'/org/freedesktop/Hal/devices/usb_device_46d_c016_noserial_if0_logicaldev_input'
--key input.x11_options.ButtonMapping --string "3 2 1"

Now, I wonder how to make this config persistent accross hald restart?

Regards,
Christophe

_______________________________________________
hal mailing list
hal@...
http://lists.freedesktop.org/mailman/listinfo/hal

Re: How to setup persistent property?

by Gilles Dartiguelongue-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le lundi 21 septembre 2009 à 13:56 +0200, Christophe Lohr a écrit :
> Hi,
>   For my Xorg, I have to setup following property regarding my usb mouse:
> hal-set-property --udi
> '/org/freedesktop/Hal/devices/usb_device_46d_c016_noserial_if0_logicaldev_input'
> --key input.x11_options.ButtonMapping --string "3 2 1"
>
> Now, I wonder how to make this config persistent accross hald restart?

you just have to write a fdi file and drop it in
(eg.) /etc/hal/fdi/policy/mapping.fdi

The file would look like:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <match key="info.capabilities" contains="input.mouse">
    <merge key="input.x11_options.ButtonMapping" type="string">3 2 1</merge>
  </match>
</deviceinfo>

This will match any mouse. They are selectors for more specific devices
but I do not have this on the top of my head right now. Hope this
helps.

--
Gilles Dartiguelongue <gilles.dartiguelongue@...>

_______________________________________________
hal mailing list
hal@...
http://lists.freedesktop.org/mailman/listinfo/hal

Re: How to setup persistent property?

by Christophe Lohr-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gilles Dartiguelongue a écrit :
>> Now, I wonder how to make this config persistent accross hald restart?
>>    
>
> you just have to write a fdi file and drop it in
> (eg.) /etc/hal/fdi/policy/mapping.fdi
>  
(..)
> They are selectors for more specific devices
> but I do not have this on the top of my head right now. Hope this
> helps.

Ecellent! Many thanks!

Is there some tutorial or tool to help writing an fdi file?

Regards
Christophe




_______________________________________________
hal mailing list
hal@...
http://lists.freedesktop.org/mailman/listinfo/hal