The officially official Devuan Forum!

You are not logged in.

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

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

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

#2 2025-11-17 22:45:09

abower
Member
Registered: 2024-04-19
Posts: 17  

Re: HOWTO : Disable mouse use in sysv-rc-conf

I agree that mouse behaviour is dangerous. The latest sysv-rc-conf does not toggle boxes when you click, it only moves the cursor to the clicked position. You need excalibur-backports to get this version (currently 1.3.0-3) - it's too new for the stable release.

This version also now installs a chkconfig symlink and extends to emulate more of chkconfig.

Offline

#3 2025-11-18 01:05:22

tux_99
Member
Registered: 2025-06-17
Posts: 68  

Re: HOWTO : Disable mouse use in sysv-rc-conf

@abower thanks for the suggestion regarding the newer version in backports, I installed it straightaway.
BTW, are you one of the authors of sysv-rc-conf (the manpage lists an Andrew Bower)?
If yes thanks for this neat tool, before discovering it I had considered porting the 'chkconfig' from Centos 6 (last one before systemd) to Devuan as I was missing chkconfig, so sysv-rc-conf saved me from this effort.

Last edited by tux_99 (2025-11-18 01:06:39)

Offline

#4 2025-11-18 07:57:47

abower
Member
Registered: 2024-04-19
Posts: 17  

Re: HOWTO : Disable mouse use in sysv-rc-conf

@tux_99 thanks for your comments! Not the original author, no, but it was abandoned for 20 years. I fixed a bug earlier in the year and before you know it I had forked it and fixed a ton more - the changelogs are under /usr/share/doc/sysv-rc-conf. The Debian trixie freeze had already started so this was too late for excalibur.

Offline

#5 2025-11-18 09:01:50

swanson
Member
Registered: 2020-04-22
Posts: 130  

Re: HOWTO : Disable mouse use in sysv-rc-conf

Can't live without sysv-rc-conf! Thanks !

Offline

Board footer