Gentoo Archives: gentoo-desktop

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-desktop@l.g.o
Subject: [gentoo-desktop] Re: How to set per-device mouse sensitivity : Revisited !
Date: Thu, 22 Apr 2010 13:43:42
Message-Id: pan.2010.04.22.13.42.39@cox.net
In Reply to: Re: [gentoo-desktop] Re: How to set per-device mouse sensitivity : Revisited ! by Mickael Chazaux
1 Mickael Chazaux posted on Thu, 22 Apr 2010 13:37:49 +0200 as excerpted:
2
3 > The <<<<<< mark was intended to highlight this line, telling that the
4 > class is being merged on the device. It is the full (relevant) log.
5
6 Ohh.. (He said) =:^)
7
8 > Sorry for the noise, I found a solution.
9 >
10 > The installed x11-drivers/xf86-input-evdev was 2.3.2 (currently stable).
11 > After installing xorg 1.8.0, I just rebuilt it as recommended.
12 > I just tried the 2.4.0, currently ~amd64, and the settings apply.
13
14 Very good! Simple enough solution, after all! =:^)
15
16 > Here is the final config file :
17 >
18 > Section "InputClass"
19 > Identifier "nomouse"
20 > MatchDevicePath "/dev/input/mouse*"
21 > Option "Ignore" "true"
22 > EndSection
23
24 BTW, prompted by my reply to you, I just set up a couple ignores here,
25 too, and yes they do rather lower the log hotplugging noise. =:^)
26
27 > (yes, in a separated file this time (for a quick hack, I used first the
28 > file I known parsed by Xorg ;-) )
29
30 Understood. I was just a bit worried that the problem might be in having
31 it in the same file, for some reason, since having different files for it
32 worked just fine here. But it was just the outdated driver.
33
34 > And the relevant part of the log ( Xorg :1 -retro -verbose 5 2>log ):
35 > [snipped] We can see the settings are applied.
36 >
37 > Another question is : I have to be root to edit this file. Is it
38 > possible to put some settings under $HOME? I have to be root to change
39 > the mouse sensitivity setting, and as I can't bear fast mice, some
40 > people like them.
41
42 That's a reasonable question.
43
44 AFAIK, with xorg-server-1.8.0, the server looks in several paths but ONLY
45 until it finds one, then it stops looking for more. So there's no direct/
46 easy way to do what you suggest. There's a patch floating around,
47 however, that makes that multiple dirs, which makes it easier. The idea
48 wouldn't be for quite the reason you stated, but rather, to separate the
49 locations into, possibly, three dirs, two standard package-config-file
50 drop dirs (one for low priority defaults, one for medium priority
51 individual package overrides, for the syntouch touchpad driver to use,
52 say), plus a high priority sysadmin override dir.
53
54 You could probably find the patch and apply it yourself to 1.8.0.
55 Meanwhile, from the discussion, it seems reasonably likely that 1.8.1 will
56 include that patch.
57
58 What you'd probably do, then, would be to either set the permissions on
59 one to user writable in-place, or make it a symlink into your user's
60 homedir. There are some interesting security implications, however, as
61 there's little stopping a user who can write one setting in the file from
62 writing a rather less desirable one, and remember, xorg DOES still, until
63 KMS becomes the norm, etc, run as root, so allowing a user total freedom
64 to configure X effectively gives them full root permissions, if they know
65 how to get them.
66
67 Instead, what's likely to happen is that the normal runtime config tools
68 will be updated to include this sort of functionality. Just as KDE and
69 the like allow setting, for instance, mouse accel, and can save that
70 setting to reapply every time the desktop starts, eventually, they'll
71 allow per-hotplug-device settings just like xorg.conf does now.
72
73 Actually, I've not really looked around for it as it's not something I've
74 needed, but I believe it's possible to configure per input-device hotplug
75 runtime behavior now -- you just have to know the intricate details of how
76 to set the individual device properties from the command-line, and how to
77 script that if you want it automated. I know it's possible to do that
78 with xrandr for multiple monitors, as I've been handling resolution
79 transitions that way myself for sometime, given that until kde 4.4, kde's
80 multi-monitor display settings were seriously broken on a lot of hardware
81 (at least the Radeon series using xorg native drivers, as I run on my
82 workstation, and the Intel hardware and driver I use on the netbook, but
83 4.4 finally fixed it!). And I've read hints that there's ways to do it
84 with input-hotplugging as well, but that's still less mature than randr
85 is, so it's no surprise it's a bit more obscure and the desktops don't
86 really handle it yet, especially given that kde's RandR support just got
87 unbroken with 4.4 and RandR's a year or two ahead of input hotplugging!
88 So figure KDE might actually support it by 4.7 or 4.9 or so... but
89 meanwhile, if you are sufficiently determined and your google foo
90 sufficiently good, you can probably manage it from the command line now.
91 I just don't know the specifics.
92
93 --
94 Duncan - List replies preferred. No HTML msgs.
95 "Every nonfree program has a lord, a master --
96 and if you use the program, he is your master." Richard Stallman