Silencing KDE application notification sounds under fvwm

October 30, 2022

Although I don't use KDE as a desktop, I use a few KDE applications from time to time, mostly kdiff3. Among other things, kdiff3's what Mercurial prefers to use when resolving conflicts in a 'hg pull -u', which comes up from time to time as I have a custom copy of the Firefox development tree. For a while now, kdiff3 and the occasional other KDE applications I use have been making noises at me to notify me of various things. I'm very strongly against programs making noises at me and normally turn this stuff off, but this time around I couldn't find an obvious way to do it in places like kdiff3's own application settings. Normal people might reach for their desktop's general settings, but for my sins I don't use a desktop environment; I use a custom setup built around fvwm as my window manager.

I was all set to write an unhappy entry lamenting how modern desktops really didn't believe in people who were doing this. Then I did a bit more Internet searching and managed to find some suggestions, so now I can tell you what seems to have worked so far for me:

  • run 'systemsettings', which will get you the KDE 5 system settings.
  • go to 'Audio', which is in the 'Hardware' section
  • turn 'Notification Sounds' down to zero volume.

Contrary to what you might think, you won't find this setting in the 'Notifcations' section, which in any case is greyed out for me because KDE thinks I'm using the GNOME notification system (which I sort of am, because I run /usr/libexec/notification-daemon by hand in my session).

(My Fedora desktop has both a 'systemsettings' and a 'systemsettings5' program, but the latter is just a symlink to the former.)

I haven't logged out and back in again, so it's possible that this setting will reset itself when I do so. Or perhaps it's been persisted in some magic place, although I did some Internet searches for obvious (or readily findable) KDE configuration files, and none of them seemed to have this (and it's not in gsettings that I could spot).

I wish all of this was better documented, but it's a futile wish at this point. Linux desktops have limited resources, so of course they prioritize documentation for people actually using their desktop (or some other reasonably popular desktop, or at least an actual desktop with all of the expected pieces), not people running weird custom environments.


Comments on this page:

From 193.219.181.219 at 2022-10-31 10:25:14:

This actually sounds like you are adjusting volume for the global PulseAudio "System events" stream, rather than anything KDE-specific – you would also find the same volume adjustment in the standalone kmix or pavucontrol tools (either the GTK or Qt version). Although I don't have KDE at hand right now to test, but the adjustment should persist in PulseAudio's stream database, next to the other per-app volumes.

(It's a slightly special "catch-all by role" stream that regular tools such as pactl don't expose, but a few years ago I wrote a tool to adjust its volume via CLI.)

By cks at 2022-10-31 11:12:30:

You're right; what I did has turned off notification sounds for everything, apparently. I'm not sure how I feel about that, and I certainly feel irritated that KDE has no setting for 'I don't want KDE programs to make notification sounds' (or 'I don't want this KDE program to make notification sounds'). But the modern desktop is what it is.

From 193.219.181.219 at 2022-10-31 16:30:32:

Well, if the sounds are associated with notifications, then it's not KDE apps themselves that are making sounds – it's notification-daemon that's making sounds. (Which I didn't know it does...)

I would then try to just hack the sound function out of it – or replace with e.g. xfce4-notifyd (which uses yet another settings system but at least I don't remember it making noises by default, and it has a more traditional look as well) or possibly even with dunst or twmn. Somewhere I also had a wrapper implementing the notification API around xmessage...

Written on 30 October 2022.
« Importing a Python program that doesn't have a .py extension
I wish ZFS supported per-user reservations, not just per-user quotas »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Oct 30 23:08:49 2022
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.