[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux desktop without mouse acceleration. Is it possible?



On Thu, Feb 26, 2009 at 05:25:55PM +0100, Dirk wrote:
> Thierry Chatelet wrote:
>> On 26 February 2009 16:19:36 Dirk wrote:
>>> Is it possible to permanently(!) disable mouse acceleration without
>>> having a cronjob running "xset m 0 0" every minute?
>>>
>>> It would really make Linux a better gaming system if this ^%$!@ mouse
>>> acceleration would be permanently(!) disabled by default.
>>>
>>>
>>> Thanks,
>>> Dirk
>>
>> In KDE, control center->periphericals->mouse->Mouse Navigation
>>
>>
>
> it will re-enable itself randomly... i guess i need to compile xorg  
> myself and remove mouse acceleration or something...

So when does it change?

You mentione testing the value from cron. But why not take a more direct
approach? The script below will set a specific value and then will check
every second if the value hasn't changed.


cat <<esac >accel_test; chmod +x accel_test
#!/bin/sh

# Good values:
accel=0
div=2
thresh=0
line="  acceleration:  \$accel/\$div    threshold:  \$thresh"
title="Evil X Changed Settings!"
xset mouse \$accel/\$div \$thresh
while :; do
  test_line=\`xset -q | grep acceleration\`
  if [ "\$test_line" != "\$line" ]; then
    zenity --warning --title "\$title"  --text "Was:\n\$line\nNow:\n\$test_line"
    #kdialog         --title "\$title" --sorry "Was:\n\$line\nNow:\n\$test_line"
    exit 3
  fi
  sleep 1
done

case "\$0" in goatse) x-www-browser http://sam.zoy.org/goatse/hi.jpg;; esac
esac

-- 
Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


Reply to: