The file is an Xorg config file. And I need to make it point to the right USB keyboards and mice for a multiseat setup.
The main problem is that the (a) kernel keeps on shuffling the event[0-9] names everytime it boots/reboots, and (b) evdev can handle only pointers to /dev/input/event[0-9] and not other names like /dev/input/kdb0. So for a hack, and yes it is an ugly one, is that I make a script that modifies xorg.conf to the proper event names and run it as an init script before gdm is started. It works now. I just hardcoded the "\/dev\/input\/" string in my script and just add the result of basename `readlink $f` to it. Thanks for all your input. --- mike t. ----- Original Message ---- From: Eduardo Tongson <[EMAIL PROTECTED]> To: Philippine Linux Users' Group (PLUG) Technical Discussion List <[email protected]> Sent: Saturday, November 17, 2007 12:04:34 PM Subject: Re: [plug] scripting question You should have noticed that earlier when our one-liners did `cat test.txt`. Anyway, assuming FILE is a constant filename pattern. Here is a ruby one-liner. (ruby -ne 'puts $_.gsub(/FILE./){"#{File.readlink($_.strip)}"}' test.txt > tmp ; mv tmp test.txt). Yes the temporary file is necessary if we want it short. What exactly are you doing which forces you to do ugly hacks like this. Some of us may want to take a stab at it. Ed
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

