Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: Guy on May 20, 2011, 07:26:22 AM
-
After raising this issue: http://forum.tinycorelinux.net/index.php?topic=9472.0
I came to the conclusion, you can change to a 2 button mouse using this command:
sed -i 's/-shadow -mouse/-shadow -2button -mouse/' ~/.xsession
You can change to back to a 3 button mouse, using this command
sed -i 's/-shadow -2button -mouse/-shadow -mouse/' ~/.xsession
I suggest the Mouse Tool be updated, to give the user the option of selecting a 2 button mouse, or a 3 button mouse. The above commands can be used with these selections.
-
That assumes options in a particular order.
Better might be:
For 3 button:
sed -i 's/-2button//' ~/.xsession
For 2 button:
sed -i 's/-2button//' ~/.xsession
sed -i 's/-mouse/-2button -mouse/' ~/.xsession
-
That would work too
This is what you meant to write
For 3 button:
sed -i 's/-2button //' ~/.xsession
For 2 button:
sed -i 's/-mouse/-2button -mouse/' ~/.xsession
-
No, that is not what I meant.
Your version for the 2 button will add additional -2buttons when they already exist.
That is why I deleted '-2button' first.
You did catch that I forgot the trailing space that might cause growing whitespace.
-
OK, if it is set up so you can select the 2 button mouse again, when it is already set to the 2 button mouse, you are right.
Another thing to think about. I kept it long in the first post, in case the file is modified in the future, and -mouse appears somewhere else. The way it is at present, it is not a problem.
If it is implemented, Robert can decide how he wants to do it. Maybe different again.