mouse motion scaling factors
Guy Harris
auspex!guy at uunet.uu.net
Sun Apr 23 00:31:43 AEST 1989
> if you edit ~/.defaults and change the mouse scaling factors,
> the change does not take effect
>
> if you edit with defaultsedit, the change takes effect
I think the problem here is that the mouse driver doesn't read your
"~/.defaults" file directly; it can only be told about the new scaling
factors by issuing the appropriate "ioctl", which "input_from_defaults"
does. "defaultsedit" runs "input_from_defaults" somewhere along the line;
"input_from_defaults" reads the updated ".defaults" file and sets the
mouse parameters.
The fact that editing ".defaults" manual doesn't change the mouse behavior
is not a bug; you have to tell the mouse driver about the new settings
with "input_from_defaults".
> if your machine reboots, the change goes away
This is because the mouse scaling factors as used by the mouse driver are
stored in CPU ram, not in any sort of non-volatile memory. As such, yes,
indeed, the change goes away when you reboot. The only non-volatile
storage that records mouse scaling factors is the ".defaults" file of
users; this is as it should be, since different users using the same
machine may well want different settings.
If you want your ".defaults" settings to be picked whenever you start up
SunView, run "input_from_defaults" in your ".login" or ".profile" file
(or, at least, do so when you know you're logged in on a workstation
console; I do so when I'm logging in to my own machine and when my
terminal, as output by the "tty" command, is "/dev/console").
> if you have mouse scaling factors set to something other than
> the default, when you run defaultsedit it not only doesn't
> realize it, it also CHANGES YOUR .defaults FILE to the
> defaults.
This is, I think, because "defaultsedit" runs "defaults_from_input" when
you edit the "Input" category. The person who made it do so probably had
what he or she thought was a good reason for doing this. Whether it's
good for other users is another matter; however, if you run
"input_from_defaults" in your ".login" or ".profile", the mouse driver's
settings will match the settings in your ".defaults" file, so it shouldn't
change your ".defaults" settings anyway (which raises the musical question
"why did it bother in the first place?").
>My workaround, the first time you log in after a reboot, run the program
>inputs_from_defaults.
That's not a workaround; that's what you were intended to do - or, more
precisely, what you were intended to do, automatically, *every* time you
log in, by having "input_from_defaults" in your ".login" or ".profile". I
don't know whether any of, say, the beginner's guides or other SunView
tutorial information mentioned this; if it doesn't, it should be changed
to do so (I only found out about this, as I remember, when I complained to
somebody in the windows group about bizarro mouse settings...).
>Never run defaultsedit after a reboot because it will wipe out your
>defaults.
If you run "input_from_defaults" in your ".login" or ".profile", this
should not be a problem.
More information about the Comp.sys.sun
mailing list