The officially official Devuan Forum!

You are not logged in.

#1 2022-11-23 21:49:33

kaiyel
Member
Registered: 2019-10-16
Posts: 24  

HOWTO : Disable mouse use in sysv-rc-conf

In another thread (https://dev1galaxy.org/viewtopic.php?id=4850) I had suggested using "sysv-rc-conf" as a means of listing all the service runlevels on a system.  It's a great utility and very similar to the "chkconfig" utility I am familiar with (from Redhat) for querying and updating the runlevel information for system services.  Give it a spin.

But the one thing about the "sysv-rc-conf" utility I find terribly annoying is that the mouse interface in the Curses widget is not de-activated.  With multiple windows open on my desktop, if I happen to click away from a terminal session running "sysv-rc-conf" to check something, and then return to that terminal session with another mouse click, and the mouse pointer happens to be over one of the "[ ]" fields where I clicked, "sysv-rc-conf" will dutifully activate or inactivate the service on that line for that runlevel.  If you don't notice the change ... Ugh!

Fortunately it is easy to disable.  Simply edit the perl script at /usr/sbin/sysv-rc-conf and change :

my $cui = new Curses::UI( -clear_on_exit    => 0,
                          -color_support    => 1,
                          -default_colors   => 1,
                        ) or die "Can't create base Curses::UI object";

to read :

my $cui = new Curses::UI( -clear_on_exit    => 0,
                          -color_support    => 1,
                          -default_colors   => 1,
                          -mouse_support    => 0,
                        ) or die "Can't create base Curses::UI object";

With mouse support disabled in the Curses widget, the risk of accidentally changing a runlevel while jumping between desktop windows is eliminated.  This should be the default, in my opinion, with perhaps a command line argument to enable the mouse interaction if the administrator so chooses.

Hope this helps,
--K

Offline

Board footer