You are not logged in.
Pages: 1
Hi!
I have prepared several .oga files to serve as substitutes to some of the (quite frankly) ugly sounding sounds in the freedesktop theme. Instead of creating my own sound theme, I have decided to modify
/usr/share/sounds/freedesktop/stereo/, replacing all the sounds I don't like to the ones I prepared. I have to do it this way, because my DE, Budgie, does not support sound themes natively.
After replacing the files, I have noticed that the ones that I have replaced do not play at all. For example, I have replaced
power-plug.ogawith my own sound, which triggers when the laptop begins charging again, however, no sound is heard when this event takes place.
Did I do a mistake?
Last edited by WinnerWind (2024-12-12 14:56:10)
Offline
What did you replace them with? Do the new sound files have the same permissions as the default sound files did?
Offline
I have replaced them with my own custom files. They appear to have the same permissions, as checked from this ls command
$ ls -l /usr/share/sounds/freedesktop/stereo/
total 648
-rw-r--r-- 1 root root 73696 Jul 5 21:55 alarm-clock-elapsed.oga
-rw-r--r-- 1 root root 17015 Jul 5 21:55 audio-channel-front-center.oga
-rw-r--r-- 1 root root 15675 Jul 5 21:55 audio-channel-front-left.oga
-rw-r--r-- 1 root root 19019 Jul 5 21:55 audio-channel-front-right.oga
-rw-r--r-- 1 root root 17099 Jul 5 21:55 audio-channel-rear-center.oga
-rw-r--r-- 1 root root 14129 Jul 5 21:55 audio-channel-rear-left.oga
-rw-r--r-- 1 root root 18791 Jul 5 21:55 audio-channel-rear-right.oga
-rw-r--r-- 1 root root 17089 Jul 5 21:55 audio-channel-side-left.oga
-rw-r--r-- 1 root root 17198 Jul 5 21:55 audio-channel-side-right.oga
-rw-r--r-- 1 root root 18152 Jul 5 21:55 audio-test-signal.oga
-rw-r--r-- 1 root root 5596 Jul 5 21:55 audio-volume-change.oga
-rw-r--r-- 1 root root 8495 Jul 5 21:55 bell.oga
-rw-r--r-- 1 root root 23142 Jul 5 21:55 camera-shutter.oga
-rw-r--r-- 1 root root 21073 Jul 5 21:55 complete.oga
-rw-r--r-- 1 root root 15375 Dec 8 20:35 device-added.oga
-rw-r--r-- 1 root root 15299 Dec 8 20:35 device-removed.oga
-rw-r--r-- 1 root root 13577 Dec 8 20:36 dialog-error.oga
-rw-r--r-- 1 root root 5666 Jul 5 21:55 dialog-information.oga
-rw-r--r-- 1 root root 27063 Dec 8 20:36 dialog-warning.oga
-rw-r--r-- 1 root root 22733 Jul 5 21:55 message-new-instant.oga
-rw-r--r-- 1 root root 24105 Dec 8 20:36 message.oga
-rw-r--r-- 1 root root 30054 Dec 8 20:40 network-connectivity-established.oga
-rw-r--r-- 1 root root 28119 Dec 8 20:40 network-connectivity-lost.oga
-rw-r--r-- 1 root root 25889 Jul 5 21:55 phone-incoming-call.oga
-rw-r--r-- 1 root root 7996 Jul 5 21:55 phone-outgoing-busy.oga
-rw-r--r-- 1 root root 4792 Jul 5 21:55 phone-outgoing-calling.oga
lrwxrwxrwx 1 root root 16 Dec 8 20:45 power-plug.oga -> device-added.oga
lrwxrwxrwx 1 root root 18 Dec 8 20:45 power-unplug.oga -> device-removed.oga
lrwxrwxrwx 1 root root 18 Dec 8 20:45 screen-capture.oga -> camera-shutter.oga
-rw-r--r-- 1 root root 33478 Dec 8 20:42 service-login.oga
-rw-r--r-- 1 root root 14573 Jul 5 21:55 service-logout.oga
-rw-r--r-- 1 root root 6849 Jul 5 21:55 suspend-error.oga
-rw-r--r-- 1 root root 38223 Jul 5 21:55 trash-empty.oga
lrwxrwxrwx 1 root root 18 Dec 8 20:45 window-attention.oga -> dialog-warning.oga
lrwxrwxrwx 1 root root 18 Dec 8 20:45 window-question.oga -> dialog-warning.ogaNote that the stuff modified on Dec 8 are by me.
I am not exactly sure how to attach the audio files themselves. Will a filegarden link do?
Offline
Are the new files encoded the same as the source files? If you have ffmpeg installed you can use:
ffprobe /usr/share/sounds/freedesktop/stereo/your_sound_file.ogato check a source file and your replacement files. The output will be something like:
Input #0, ogg, from '/usr/share/sounds/freedesktop/stereo/message.oga':
Duration: 00:00:00.31, start: 0.000000, bitrate: 268 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 192 kb/swhere "vorbis" is the codec in this case.
Offline
They appear to be quite different. I made a backup of the freedesktop sound theme before starting, so I could compare them rather easily.
Input #0, ogg, from '/usr/share/sounds/freedesktop-backup/stereo/network-connectivity-established.oga':
Duration: 00:00:00.22, start: 0.000000, bitrate: 313 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 192 kb/sInput #0, ogg, from '/usr/share/sounds/freedesktop/stereo/network-connectivity-established.oga':
Duration: 00:00:00.96, start: 0.000000, bitrate: 250 kb/s
Stream #0:0: Audio: flac, 48000 Hz, stereo, s16
Metadata:
encoder : Lavc58.134.100 flacAlso, I noticed that the sound doesn't play with paplay. I have no idea why this is happening.
$ paplay /usr/share/sounds/freedesktop-backup/stereo/network-connectivity-established.oga
<sound plays, no output>
$ sudo paplay /usr/share/sounds/freedesktop/stereo/network-connectivity-established.oga
Failed to open audio file.Weirdly, they play in VLC, but not via paplay. Spooky. Well, I'm going to try to re-encode these and I'll post an update.
Offline
Update
Re-encoded all my wav source files with this small script I made
for file in *.wav; do ffmpeg -i "$file" -af volume=0.2 -c:a libvorbis -b:a 128k -ar 44100 "${file%.wav}.oga"; doneNow my custom SFX plays when the audio is plugged in and out. Thank you! This thread is done.
EDIT : The volume part can be modified in case you want a louder sound.
Last edited by WinnerWind (2024-12-12 14:59:05)
Offline
Pages: 1