[Sugar-devel] Modern Linux trends

C. Scott Ananian cscott at cscott.net
Mon Apr 26 11:33:45 EDT 2010


Brief tutorial on Gobject: http://cananian.livejournal.com/58744.html

Sorry, Bernie you don't get any sympathy from me: XFConfig deserves to
die, no matter how much you liked it.  And are you really running
Gentoo and complaining whenthings break?  Seriously?  That's the price
of unstable (and progress): sometimes things get broken before their
replacement is quite ready.  I'm not a udev expert yet either, but as
far as I can tell it's not obviously the wrong thing here.  Maybe you
should try to contribute udev versions of the hal-* cli tools, if they
don't already exist?
  --scott

On Monday, April 26, 2010, Bernie Innocenti <bernie at codewiz.org> wrote:
> On Sun, 2010-04-25 at 18:54 -0400, C. Scott Ananian wrote:
>> I am failing to resist responding to this troll.
>>
>> Dbus access from the command line is fairly good, and NM supports a
>> number of static data files for configuration if that's what you want
>> yo do.  Fear not, scriptability of Unix systems is, if anything,
>> *increasing*, as there are now powerful ways to get at the internals
>> of most system software using things like gobject, which provide much
>> more powerful mechanisms than simple pipes and getopt.
>
> +1 Insightful.
>
> You would have got a +1 Informative if you'd link to a nice tutorial.
> I've always wanted to learn how to control things with dbus.
>
>
>> Learn the new tools, you'll like them.  Arguing from the
>> stuck-in-the-mud old fart perspective may be fun, but it's not
>> constructive.
>
> Bah, such a luddite! ;-)
>
> I'll go back trying to get my scroll wheel emulation to work in my brand
> new X 1.8. The old xorg.conf way was way too easy:
>
>   Option "EmulateWheel" "1"
>   Option "EmulateWheelButton" "2"
>
> When static configuration files fell in disgrace, I figured out that I
> could achieve the same functionality by means of this "simple" HAL fdi:
>
> /etc/hal/fdi/policy/10-bernie.fdi:
>  <?xml version="1.0" encoding="ISO-8859-1"?>
>  <deviceinfo version="0.2">
>   <device>
>     <match key="info.capabilities" contains="input.mouse">
>       <merge key="input.x11_driver" type="string">mouse</merge>
>       <match key="info.product" contains="TPPS/2 IBM TrackPoint">
>         <merge key="input.x11_options.EmulateWheel" type="string">1</merge>
>         <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
>       </match>
>       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
>         <merge key="input.x11_driver" type="string">evdev</merge>
>       </match>
>     </match>
>   </device>
>  </deviceinfo>
>
>
> Now hal also fell in disgrace and devices are being configured directly
> by udev. Being clueless, I asked my friends on #xorg-devel:
>
>  <bernie>    whot: what's the udev equivalent of these hal rules for Xorg 1.8?
>  <remi|work> bernie, we started writing an upgrade guide for our users with a couple examples : http://dev.gentoo.org/~scarabeus/xorg-server-1.8-upgrade-guide.xml
>  <bernie>    remi|work: thanks!
>  <dberkholz> remi|work: yeah, i guess we could reverse our old script that translated xorg.conf to fdi
>  <dberkholz> wherever that thing ended up
>  <remi|work> dberkholz, that script is dead, it relied on xf86config which can't be pulled easily from the server
>  <dberkholz> it's been a while, but i thought we had figured out some way around that
>  <remi|work> dberkholz, besides, I've never been a huge fan of that script. I think our users should know what they're doing
>  <remi|work> so we're documenting it properly
>  <dberkholz> i think knowing what you are doing is different from creating needless work
>  <dberkholz> when will people ever need to repeat this task again? how is it a valuable skill?
>  <remi|work> then let's not run the script by default
>  <remi|work> if you create one...
>  <remi|work> IMHO, trying to figure out how to parse HAL .fdi files isn't much fun.
>  <remi|work> and given the complexity HAL files can reach, I don't think it'll work reliably
>  <dberkholz> sigh. that dumb script was never written to actually understand the xml, just to output tags as raw text.
>
> Eventually, I wrote this:
>
>  Section "InputClass"
>         Identifier "TPPS/2 IBM TrackPoint Wheel Emulation"
>         Driver "evdev"
>
>         Option "EmulateWheel"           "true"
>         Option "EmulateWheelButton"     "2
>
>         MatchProduct "TPPS/2 IBM TrackPoint"
>  EndSection
>
> Unfortunately, it doesn't seem to work. I'm not really sure what the
> product string is supposed to be, and testing changes requires
> restarting X.
>
> Meanwhile, I'm typing two obscure xinput commands manually every time I
> start my X server:
>
>  xinput --set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Button' 8 2
>  xinput --set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 8 1
>
> Ah, progress... why don't anyone just love it? Now you've got to be a
> hacker with connections with the Xorg core developers in order to
> configure your clit mouse on Linux!
>
> --
>    // Bernie Innocenti - http://codewiz.org/
>  \X/  Sugar Labs       - http://sugarlabs.org/
>
>

-- 
                         ( http://cscott.net/ )


More information about the Sugar-devel mailing list