Reimplementing a GUI Mouse configuration tool in antiX 23

Forum Forums Official Releases antiX-23 “Arditi del Popolo Reimplementing a GUI Mouse configuration tool in antiX 23

  • This topic has 104 replies, 9 voices, and was last updated May 27-4:05 pm by BobC.
Viewing 15 posts - 76 through 90 (of 105 total)
  • Author
    Posts
  • #136038
    Moderator
    Brian Masinick

      @PPC Again, I did not cover ALL test cases, but I did download and run a couple of simple tests;
      looks like the basic tool still works; you and Robin can dig deeper into the specific features,
      and maybe @Dave will want to check it out too and see how (or if) this complements the work
      in his previous tools; perhaps there is some synergy there afterall, based on what I read
      earlier from @Dave himself.

      Good work; enjoy time with your daughter and have a good weekend!

      --
      Brian Masinick

      #136039
      Moderator
      Brian Masinick

        Earlier, I wrote: “Most other touchpads I use feel pressure or SOMETHING on the keypad and INCORRECTLY select and cut text often, which IS the REASON that I sought a touchpad disabling feature” –

        touchpad sensitivity – in my case, this means that text would get selected and cut – and to the best of my knowledge, I was NOT touching, selecting, and definitely not pressing the touchpad. Because of this sensitivity, I sought to disable it and use a mouse connected to a USB port.

        My wordy comments were written in post #136011. This is an attempt to explain and summarize the primary intent; the other post goes into detail, perhaps too much detail, so this condenses my comments to briefly explaining what I mean by touchpad sensitivity.

        --
        Brian Masinick

        #136167
        Member
        dspencerj3

          @Dave – you …

          “step-by-step for dummies” on how to do this, please?

          To use the script just download the zip file, uncompress it and launch the script that’s there. Configure your device(s) and then make sure that the checkbox at the bottom is checked. That will make sure that your startup file always launches a script that my GUI generates, implementing the choices you made.
          Note: if you launch the GUI and don’t have that checkbox checked (it’s always off by default), when you click “apply” instantly the startup file will be edited and the script that launches your pointing device’s configuration will be commented out…
          There is no need to add my script to the startup file- unless you really want the GUI to open every time your system starts! If you do want that – there’s a GUI, that I created, that allows to edit the startup file, in antiX 23. Search for “startup” using app-select, in antiX’s menu!

          P.

          PPC,

          “…launch the script that’s there…”

          Coming from a Mac world, “launching” things is done by double-clicking them. I eventually figured out how to right-click -> execute and finally saw your wonderful GUI control panel for my mouse.

          “…no need to add my script to the startup file…”

          Totally agree — now that I understand a teensy bit better how this whole thing works. Now I realize that your script’s purpose is to change the startup files that control the configurations for our pointing devices.

          “…That will make sure that your startup file always launches a script that my GUI generates…”

          Though this does sound like I was in the ball park with my understanding … that something runs every time I startup.

          But — (as Peewee Herman says: “Everyone has a big butt!”) The settings are not prevailing through a reboot for me. When I execute it, the changes happen great. They just don’t stick. I recall you writing something a few versions ago about needing to put a certain line in my startup file. But I’m pretty sure you said a subsequent version took care of that. Maybe there is something about my system or the way I am set up that is preventing it from working?

          I am using the script called “antix_pointing_device_managerTESTING-robin2”, which looks like the latest one, right?

          I am triple booting Windows 10, Zorin 16, and antiX 23. Could that play a factor?

          Thanks again for all your time and expertise!

          • This reply was modified 2 months, 2 weeks ago by dspencerj3.
          #136173
          Member
          PPC

            I am using the script called “antix_pointing_device_managerTESTING-robin2”, which looks like the latest one, right?

            Yes, for now. that script includes 2 features suggested by Robin, hence it’s name.

            The settings are not prevailing through a reboot for me.

            Sorry, I was tired, and, while trying to use a double negative in my instructions I messed up: you always have to check the checkbox on the bottom of the script’s GUI (that is always unchecked, every time you launch the script) in order for the settings managed by the script to automatically load every time the script restarts.
            The fact that your machine is multiboot does not affect the way this script works at all.

            @Everyone – specially @Robin and @anticapitalista – if this script works without bugs, as it does in the computers I tested it in, I recommend adding it to the antiX Control Center in antiX 23, side by side, next to ds-mouse, for now. You can even call it something like “Xinput Pointing Device Manager” – I know “pointing device” is a mouth full, but saying just “mouse” when, in fact, it manages all pointing devices, like touchpads is not accurate… but the default icon that I use (the same one as ds-mouse) is clear…

            EDIT: I usually provide very detailed instructions,but some times I assume that users are familiar with what some very used expressions mean. Folks coming from other OSes, do require time to adjust to how that works, sorry I neglected that detail. You can configure the default file manager, ZzzFM, to launch executable files, such as scripts with a single click (some thing that is probably better for your “muscle memory”): open ZzzFM > View > Preferences > “Desktop” Tab > Make sure “Single click opens files” is checked > Click “Ok”

            P.

            • This reply was modified 2 months, 2 weeks ago by PPC.
            #136176
            Member
            PPC

              I just retouched the way the script looks, making it easier to see what device is being managed, and making the “Apply” button clearer in what it does (it now reads, “Apply and exit”, so people don’t complain that the main window is closed when they click that button, and come asking if it’s a bug- it isn’t a bug, it’s a feature).
              I also had forgotten to increase the maximum possible “Speed” up to 10, and I fixed that. I still think that increases of 0.1 in that value are ideal (so I kept that). I tried to implement a slider for setting numeric values, but I did not quite make it work… In the final version, it is advisable to also have a smart check-box on the bottom, that is always checked or unchecked, according to the user’s last choice (of always using the chosen values every time antiX restarts or not)…

              Edit: I just took a quick look at the settings that xinput allows to manage and to what I know how to implement. The only possible feature that I can try to add to the script is
              switching between “Accel Profile”, but I just tried that and found that 1,0 or 0,1 looked the same to me, even after reading the explanations on this thread.
              What I could try to implement in the future is a way to select the double click speed (instead of just switching between 2 values: default and slow) and, with luck, to implement a slider for choosing numeric values.
              I just took a look, in a VM, to the way MX Linux manages mouse and touchpad and I like better one single “tab” that allows access to all settings, like ds-mouse and my proposed scripts do. I can understand using tabs if there are lots and lots of choices… but pointing devices don’t have that many features that can me managed, and it makes sense to display them all, so, with a single glance, users can see what they can manage and what the current default values are…

              So, I think that, as is, this tool is already production ready (if no one finds bugs) and can/should be added to antiX, to allow users to always manage pointing devices. “fixing” the problem of no longer using synaptics that causes some features of ds-mouse to not work.

              P.

              • This reply was modified 2 months, 2 weeks ago by PPC.
              #136185
              Member
              Robin

                Exclaimer: @PPC The below is based on former version _2, not _3 which you have posted meanwhile but which was visible here only after writing the following:

                Have currently not the time to test it completely, have managed just to have a short glance at it yesterday evening. Here my remarks on it:

                – Please replace the expression in line 182 by
                $current_speed\!0.01..10\!0.01\!2
                This allows a wider range of device adaption.

                – Please filter for expressions like “keyboard” in the list created for the input device pulldown menu to exclude them. I have constantly to pick the mouse in between two keyboard entries from the selection pulldown (not really problematic, since the wrong entries clearly read keyboard, but users might be puzzled, since keyboards are usually not understood as pointing devices…) Besides, what happens, if a user has a single keyboard and no mouse or touchpad connected, and clicks the control centre entry nevertheless? Is the script going to present the pointing device configurations for this keyboard then automatically, since it is the single input device caught and then no selection comes up?

                – The script exits always with applying the current settings from the entry fields, even when user rather wants to abstain from doing any changes. This happens even when clicking the X in the window border or using the esc key to just close it. A more selective exit strategy is needed before it can be used. E.g. a Button reading Leave placed left from the Apply button, and catch also for 252.

                – Technical detail: No need to repeat the two functions probably, just for changing the targetfile, if there is nothing changed in them besides this (didn’t check carefully, just a short glance), If so, just declare the new targetfile before calling the functions, and set it back by another declaration afterwards:

                STARTUP_FILE="$HOME/.gtkrc-2.0.mine"
                   add_startup 'gtk-double-click-time = 800'
                   disable_startup 'gtk-double-click-time = '
                STARTUP_FILE="$HOME/.desktop-session/startup"
                   next regular call of add_startup or disable_startup

                Coming from a Mac world, “launching” things is done by double-clicking them.

                This is reduced/simplified Apple speech. Launching means generally executing either a script or a program, and either automatically, called by another script or startup routine, or by entering the command into the command line, or (this is what apple reduced the meaning to) by double clicking a launcher. Actually there are some more ways to launch an application, and not all of them require user interaction.

                Maybe there is something about my system or the way I am set up that is preventing it from working?

                Single thing I could think of is: Are you running live or frugal install? This actually would require either live-persistence or a live-remaster then to make the settings being kept after reboot.

                I am triple booting Windows 10, Zorin 16, and antiX 23. Could that play a factor?

                No, that should not have any impact on the way the startup configs are run here.

                • This reply was modified 2 months, 2 weeks ago by Robin. Reason: There showed a new version up after posting this

                Windows is like a submarine. Open a window and serious problems will start.

                #136188
                Member
                Robin

                  @PPC On ver 3, without having run it, just from your remarks on it:

                  I still think that increases of 0.1 in that value are ideal (so I kept that).

                  This renders it impossible to set values between 0.01 and 0.09 which is necessary for some devices, so this is not ideal at all.

                  Windows is like a submarine. Open a window and serious problems will start.

                  #136191
                  Member
                  PPC

                    The script exits always with applying the current settings from the entry fields, even when user rather wants to abstain from doing any changes.

                    I can’t replicate that.
                    If I run from the terminal, what the script does is ALWAYS displaying the current settings, when exiting, EVEN when nothing is changed.
                    I just did a simple test here: I clicked the option to disable the mouse. Closed the window by clicking the X button on the window toolbar title bar . No change happens, the mouse is still active. Does the script behave differently for you? If so, we’ll have to address that…

                    I already increased the maximum “speed” value to 10, but I still think increases/decreases of 0.1 are more pratical to users (instead of 0.01).

                    When generating the list of devices that can be managed, the script runs this command:

                    xinput list --name-only | grep -v "Virtual" |grep -v "Button" | grep -v "eyboard" | grep -v "KEYBOARD" | grep -v "hotkeys"
                    In my tests it always removes entries listed as Keyboad, keyboard or KEYBOARD… So I think I covered all the possibilities… What does that command return in your computer?

                    EDIT: we typed at the same time, this last couple of posts. Please try changing the increase/decrease value, in yad command, in line 182 and see if that works well for you.

                    P.

                    • This reply was modified 2 months, 2 weeks ago by PPC.
                    • This reply was modified 2 months, 2 weeks ago by PPC.
                    #136196
                    Member
                    Robin

                      increases/decreases of 0.1 are more pratical to users (instead of 0.01).

                      Maybe more practical, but excludes the range from 0.01 to 0.09 the same time.

                      What does that command return in your computer?

                      $ xinput list --name-only | grep -v "Virtual" |grep -v "Button" | grep -v "eyboard" | grep -v "KEYBOARD" | grep -v "hotkeys"
                      Logitech MX Keys
                      Logitech M705
                      Logitech MX Keys

                      So probably some regex for [Kk]ey.* must be added, since a pointing device rarely will be named keys.

                      Windows is like a submarine. Open a window and serious problems will start.

                      #136197
                      Member
                      Robin

                        Maybe just the console output is misleading after closing the window without applying? It reads that way even after not applying the changes, from this I took the config is changed:

                        The current config is:
                        xinput set-prop "Logitech M705" "libinput Accel Speed" ""
                        xinput set-prop "Logitech M705" "Coordinate Transformation Matrix" 0 0 0 0 0 0 1
                        	libinput Middle Emulation Enabled (293):	0
                        	libinput Horizontal Scroll Enabled (303):	0

                        So it merely reads that way, without applying it actually?

                        Nevertheless, there should be a leave button for users of decorations without an x in window border or not knowing the esc key.

                        Windows is like a submarine. Open a window and serious problems will start.

                        #136200
                        Member
                        PPC

                          Change log:
                          -“Speed” can be set from 0.01 to 10, with 0.01 increases
                          -Added a warning that closing the window or pressing the “Esc” key exits without changing anything

                          I currently can’t spend any more time on this script.
                          @Robin – if you want, please adapt the script. I think it currently is the best I can make it, for now.

                          EDIT: I did not forget to exclude “keys” from the list of available devices – I just though it would be dangerous, in case a mouse has a name like “USB mouse with function keys” or something similar. The list of available devices can be improved, of course, I just did the best I could in the time I had available.

                          P.

                          • This reply was modified 2 months, 2 weeks ago by PPC.
                          #136215
                          Moderator
                          Brian Masinick

                            Change log:
                            -“Speed” can be set from 0.01 to 10, with 0.01 increases
                            -Added a warning that closing the window or pressing the “Esc” key exits without changing anything

                            I currently can’t spend any more time on this script.

                            @Robin
                            – if you want, please adapt the script. I think it currently is the best I can make it, for now.

                            EDIT: I did not forget to exclude “keys” from the list of available devices – I just though it would be dangerous, in case a mouse has a name like “USB mouse with function keys” or something similar. The list of available devices can be improved, of course, I just did the best I could in the time I had available.

                            P.

                            I gave this one a try too, first disabling my Touchpad, since my mouse is connected, and secondly, altering one of the speed parameters for the Mouse; both seem to work fine.

                            I’ve also run a few additional tests with one of the other scripts you wrote, one I entitled mouse-or-touchpad.bash – that one is handy too; it detects when I plug in or remove the USB mouse; on that one, the only additional feature that would be very cool is to add code to turn it into a daemon process, as we discussed before the weekend; otherwise that one also works well.

                            Bottom line is that we now have the existing tool that Dave wrote which provides all of the necessary and classic synaptics touchpad logic, coupled with this routine; I’ve NOT tested this one with synaptics because my current device can only handle the xinput method with the software I am now using. Other than that, and the fact that I only have two of the numerous devices available, at least I’ve verified that several of your scripts DO in fact work in many of the common scenarios; I hope that more people will evaluate them so we have test coverage with more devices.

                            --
                            Brian Masinick

                            #136221
                            Member
                            dspencerj3

                              @Robin

                              “Single thing I could think of is: Are you running live or frugal install? This actually would require either live-persistence or a live-remaster then to make the settings being kept after reboot.”

                              I ran “apt-cache policy grub*” and got these as installed (the remaining 987 entries were “Installed: (none)”):

                              grub-pc-bin:
                              Installed: 2.06-13+deb12u1

                              grubcc-antix:
                              Installed: 0.1.2

                              grub-efi-amd64-bin:
                              Installed: 2.06-13+deb12u1

                              grub2-common:
                              Installed: 2.06-13+deb12u1

                              grub-common:
                              Installed: 2.06-13+deb12u1

                              grub-efi-ia32-bin:
                              Installed: 2.06-13+deb12u1

                              grub-pc:
                              Installed: 2.06-13+deb12u1

                              Running that command was the only thing I could find to try to determine if I installed live or frugal. I don’t recall choosing those when I did it a couple of months ago. But the forum I found the command in did not go on to explain how to interpret the results.

                              Also, @PPC, your instructions about the checkbox at the bottom were very clear and I have been checking it every time. 🙂

                              Thanks again!

                              PS: Do you guys ever sleep?!? LOL

                              #136225
                              Member
                              PPC

                                I don’t like unpolished details… I did not have time to properly test this version:

                                -The part of the script that lists the devices was reworked, so it no longer should include anything “keyboard” related (that’s the part that requires testing)

                                -I also added an indication of the default values for the numeric fields (a lazy equivalent of the “Restore defaults” in ds-mouse) and removed the CLI output that Robin found confusing…

                                Everything else remains unchanged.

                                @Mr Masinick – I think that the single real feature that worked for me in ds-mouse that I can’t replicate (because simply xinput does not have that feature and I can’t implement it without a deamon) is the “turn off touchpad while typing” related options. That’s a fringe case, since I’ve been using laptops and netbooks to type (including very large texts) for over 20 years and never missed that feature- and can be replaced by using a script to toggle the touchpad on/off with a key press (if I had the time I would that as a function that could be called with a -t flag)

                                P.

                                #136231
                                Moderator
                                Brian Masinick

                                  I don’t like unpolished details… I did not have time to properly test this version:

                                  -The part of the script that lists the devices was reworked, so it no longer should include anything “keyboard” related (that’s the part that requires testing)

                                  -I also added an indication of the default values for the numeric fields (a lazy equivalent of the “Restore defaults” in ds-mouse) and removed the CLI output that Robin found confusing…

                                  Everything else remains unchanged.

                                  @Mr Masinick – I think that the single real feature that worked for me in ds-mouse that I can’t replicate (because simply xinput does not have that feature and I can’t implement it without a deamon) is the “turn off touchpad while typing” related options. That’s a fringe case, since I’ve been using laptops and netbooks to type (including very large texts) for over 20 years and never missed that feature- and can be replaced by using a script to toggle the touchpad on/off with a key press (if I had the time I would that as a function that could be called with a -t flag)

                                  P.

                                  I don’t know about that particular feature either @PPC; I had to do quite a bit of research; I did my first round of research a couple of months ago when you introduced xinput for the first time during Alpha testing of our now released system. When the synaptics – synclient versus xinput – libinput came up in discussion I did more research and suggested a few notes, but I’m definitely not an expert on the topic. Oh yes, just so you have it noted, “deamon” is actually known as “daemon” in UNIX and Linux literature – https://itsfoss.com/linux-daemons/ – “Linux Jargon Buster: What are Daemons in Linux?”

                                  ” daemon (usually pronounced as: day-mon, but sometimes pronounced as to rhyme with diamond) is a program with a unique purpose. They are utility programs that run silently in the background to monitor and take care of certain subsystems to ensure that the operating system runs properly. A printer daemon monitors and takes care of printing services. A network daemon monitors and maintains network communications, and so on.”


                                  “For those people coming to Linux from the Windows world, daemons are known as services.”

                                  “Daemons perform certain actions at predefined times or in response to certain events. There are many daemons that run on a Linux system, each specifically designed to watch over its own little piece of the system, and because they are not under the direct control of a user, they are effectively invisible, but essential. Because daemons do the bulk of their work in the background, they can appear a little mysterious and so, perhaps difficult to identify them and what they actually do.”

                                  examples: udisksd, gvfsd, systemd, logind, upowerd

                                  --
                                  Brian Masinick

                                Viewing 15 posts - 76 through 90 (of 105 total)
                                • You must be logged in to reply to this topic.