Bug 409300

Summary: KDE Platform flatpak runtime is missing the Oxygen theme's sounds
Product: [Developer tools] Qt/KDE Flatpak Runtime Reporter: skierpage <skierpage>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:

Description skierpage 2019-06-29 08:18:58 UTC
SUMMARY
When I run the skrooge flatpak, the console shows a warning
  ##WARNING: Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification
and there are no sounds.
Searching for "flatpak" and this warning message suggests that the marble and kdenlive flatpaks also don't play notification sounds, but I haven't reproduced this problem with them.

STEPS TO REPRODUCE
1. flatpak install org.kde.skrooge
2. flatpak run org.kde.skrooge
3. Click Accounts, create an account (choose any bank icon, enter Account "test" and Number "1234" and click [+ Add]). 

OBSERVED RESULT
The following appears at startup in the terminal:
  ##WARNING: Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification
And when you perform operations that normally play a happy sound, there's no sound.

EXPECTED RESULT
No startup warning, and sounds.

skrooge.notifyrc specifies
  Sound=Oxygen-Sys-App-Error.ogg
  Sound=Oxygen-Sys-App-Negative.ogg
  Sound=Oxygen-Sys-App-Message.ogg
  Sound=Oxygen-Sys-App-Positive.ogg

strace shows the flatpak app tries to access these sounds from  
  $HOME/.var/app/org.kde.skrooge/data/sounds/
  /app/share/sounds/
  /usr/share/sounds/
  /run/host/share/sounds/
and they're not available in any location, hence the warning.

In Fedora, these files are in /usr/share/sounds/ . They are supplied by the oxygen-sound-theme package, 2 MB of files, so maybe that package should be part of the KDE runtime the same way /usr/share/sounds/freedesktop/stereo/ files are in the KDE runtime.


SOFTWARE/OS VERSIONS
flatpak version 1.4.1
Linux/KDE Plasma: 
(available in About System)
^ from `flatpak run --command='kdeinit5' org.kde.Platform --version`
KDE Plasma Version: n/a
KDE Frameworks Version: 5.12.4
Qt Version: 5.59.0

ADDITIONAL INFORMATION

I tried working around the problem by copying the four .ogg files mentioned in skrooge.notifyrc into /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/18.08/active/files/share/sounds but they didn't show up in the flatpak; I'm not sure how the "host" directories are mounted.

I then tried copying the sounds into $HOME/.var/app/org.kde.skrooge/data/sounds/ , which avoided the WARNING about sound file not found, but... I didn't hear any sound, even with `flatpak run --socket=pulseaudio org.kde.skrooge`. 

FWIW kdenlive.notifyrc references two of the same sound files, plus a fifth, Oxygen-Sys-Warning.ogg.
Comment 1 skierpage 2020-03-10 01:36:27 UTC
I've retitled this bug to make it about adding the Oxygen theme sounds to the KDE Platform flatpak runtime. The KDE Platform has other sounds in freedesktop/stereo and Oxygen icons in plasma/desktoptheme/oxygen , so (by set theory ;-) ) /var/lib/flatpak/runtime/org.kde.Platform/... should include the sounds from the oxygen.git repository as well.

(In reply to skierpage from comment #0)
> I then tried copying the sounds into
> $HOME/.var/app/org.kde.skrooge/data/sounds/ , which avoided the WARNING
> about sound file not found, but... I didn't hear any sound, even with
> `flatpak run --socket=pulseaudio org.kde.skrooge`. 
Sounds now play with Flatpak 1.4.4 if I do both those things; I'll file a separate bug for Skrooge. BTW another way to test sound in Skrooge is open Settings > Notifications, choose a notification,  and click the [▶] play button.