[comp.sys.sun] mouse motion scaling factors

chuck@trantor.harris-atd.com (Chuck Musciano) (03/02/89)

> I've noticed that whenever I increase (i.e. > 2) the mouse motion scaling
> factor (1st_ceiling) on monochrome Suns it updates the default parameters
> for that session only.

You need to use the input_from_defaultsw command in your .login.  Read the
appropriate manual page.  I have no idea why you only see this behavior on
your monochrome system.

Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck@trantor.harris-atd.com

mikey@uunet.uu.net (Mike Lee) (03/04/89)

Sandeep Mehta asks the musical question...

>I've noticed that whenever I increase (i.e. > 2) the mouse motion scaling
>factor (1st_ceiling) on monochrome Suns it updates the default parameters
>for that session only.
>
>This problem persists only on monochrome Suns not on color Suns where it
>reads in the correct value from .defaults on startup. Any clues ?

I have had similar problems.  The settings I gave would only last until
the machine was rebooted, then they would revert to some ridiculous
defaults.  This was on a color 4/110 by the way.

The answer is to use this little jewel of a command, perhaps in your
.suntools file:

  input_from_defaults

This forces mr. computer to read your defaults file and get the scaling
factors and ceilings for miss mouse.  Be careful not to confuse it with
its evil twin defaults_from_input which will destroy your defaults file.

Let the Orinoco Flow...

Mike Lee (I wish I had a cool name like "Sandeep Mehta")
Ontek Corporation

VOX:  1-714-768-0301
UUCP: ontek!banzai!mikey@uunet.uu.net
USPS: 22951 Mill Creek Road
      Laguna Hills CA 92653

Kemp@dockmaster.arpa (03/09/89)

In Sun-spots v7n161 Sandeep Mehta reports problems with mouse scaling on a
monochrome system but not on color.  We are having the same problem on a
color Sun-3/60 running 4.0, and it was not fixed in 4.0.1.  In this case,
the system will NOT read the .defaults file correctly even after logging
out and back in, or after rebooting the machine.  The scenario is:

 1. edit ~/.defaults (with vi or the window editor) to contain some
    higher speed factors (I use 2, 4, 6 with ceilings of 2, 8, 65535).
 2. exit and restart sunview, or logout, or reboot - it doesn't matter;
    when you get back into sunview, the mouse is still the same old slow
    speed.
 3. run defaults_edit and select "Input"; it says "running conversion
    program input_from_defaults" (or defaults_from_input, I forget which),
    it sets the mouse parameters to the standard values (2, 65535), AND
    IT WIPES OUT THE SETTINGS IN .defaults!!! (resets them to standard).
 4. set the scaling factors to the desired fast values from within
    defaults_edit and hit "Save", and voila, the mouse now works fast
    and the .defaults file is again correct.
 5. use the machine for long enough, and at some random time the mouse
    will switch back to normal speed.

I don't know why sunview won't correctly set the mouse speed from the
user's .defaults file, but there is clearly a bug in defaults_edit which
writes to .defaults without the user hitting "Save".

Does anyone else use faster than normal mouse scaling and if so, do you
have these problems?

  Dave Kemp

chuck@trantor.harris-atd.com (Chuck Musciano) (03/14/89)

> problems with mouse scaling on a monochrome system but not on color

When the system boots, it loads the default mouse tracking parameters.
Unless you run "input_from_defaults" when you get into suntools, new
values will not be loaded.  I agree, it is a bug that defaultsedit will
wipe out existing values when loading up the current values.

Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck@trantor.harris-atd.com

jlp@cs.utah.edu (Jan L. Peterson) (03/31/89)

Dave Kemp mentions some problems with faster than normal mouse scaling.
I've had these problems on my Sun-3/260 in OS revisions 3.2, 3.4, 4.0, and
now 4.0.1.

Here are some of the symptoms:
	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

	if your machine reboots, the change goes away

	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.

I reported this to sun about a year and a half ago.  I actually spoke to
an engineer about this and he said "I can't reproduce it."  While I had
him on the phone, I had him change his defaults with defaultsedit and
reboot his machine.  Suddenly, he COULD reproduce it.  I have not heard
from sun on this problem since.

My workaround, the first time you log in after a reboot, run the program
inputs_from_defaults.  Never run defaultsedit after a reboot because it
will wipe out your defaults.

Good luck.

	-jan-
--
        Jan L. Peterson
UUCP:   { ...!utah-cs!caeco | quad1 }!olyis!jlp
Mail:   Olympus Software, Inc.; 1333 E 9400 S; Sandy, UT 84093 (USA)
Phone:  +1 801 572 1610

guy@uunet.uu.net (Guy Harris) (04/22/89)

>	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.

igp@uunet.uu.net (Ian Phillipps) (04/26/89)

caeco!olyis!sol!jlp@cs.utah.edu (Jan L. Peterson) writes:
>Dave Kemp mentions some problems with faster than normal mouse scaling.
>Here are some of the symptoms:...
>	if your machine reboots, the change goes away
>My workaround, the first time you log in after a reboot, run the program
>inputs_from_defaults.  Never run defaultsedit after a reboot because it

It used to hit me every time I logged in; no reboots.  I now have
"input_from_defaults" (note the missing "s") in my .login file.  There was
a posting here about this a few weeks ago (for which, much thanks).

UUCP:  igp@camcon.co.uk   | Cambridge Consultants Ltd  |  Ian Phillipps
or:    igp@camcon.uucp    | Science Park, Milton Road  |-----------------
Phone: +44 223 420024     | Cambridge CB4 4DW, England |

steed@TECHUNIX.BITNET (Ze'ev "Steed" Shtadler) (05/09/89)

In article <1360@auspex.auspex.com> auspex!guy@uunet.uu.net (Guy Harris) writes:
>...
>If you want your ".defaults" settings to be picked whenever you start up
>SunView, run "input_from_defaults" in your ".login" or ".profile" file

I have put "input_from_defaults" in my ~/.suntools, this way I get it is
run whenever I start suntools.  No need to check for "/dev/console" etc.

                                        Ze'ev.
--
Ze'ev Shtadler.                   ARPANET: steed%techunix.bitnet@cunyvm.cuny.edu
Computer Science Faculty,                UUCP: ...!psuvax1!techunix.bitnet!steed
Technion, Israel Institute of Technology,                 BITNET: steed@techunix
Haifa Israel                               Domain: steed@techunix.technion.ac.il
Phone (work): (+972) 4-294304     CSNET: steed%techunix.bitnet@csnet-relay.csnet