to play sound from a script/bash/command line: there are multiple possibilities…
hostnamectl; # tested on Static hostname: DebianLaptop Icon name: computer-laptop Operating System: Debian GNU/Linux 9 (stretch) Kernel: Linux 4.9.0-11-amd64 Architecture: x86-64 # paplay seems to be part of the package: apt install pulseaudio-utils; # Befehlszeilenwerkzeuge für den Soundserver PulseAudio paplay Debian_Linux_Startup_Linux_Sound_Collection.ogg # or with absolute paths: /usr/bin/paplay /path/to/Debian_Linux_Startup_Linux_Sound_Collection.ogg # alternative: vlc apt install vlc # if you have vlc player installed (apt-get install vlc) cvlc --play-and-exit Debian_Linux_Startup_Linux_Sound_Collection.ogg # problem: if one has configured vlc to loop the playlist # it might not exit but keep repeating the sound
test sound:
Debian_Linux_Startup_Linux_Sound_Collection.ogg.tar
how to trigger sound play?
it definitely needs to happen as the user that is also is running/logged in to the x session/desktop otherwise one will get:
/scripts/start.sh Connection failure: Connection refused pa_context_connect() failed: Connection refused
under MATE and Cinnamon Desktop simply search for “startup applications” widget and add like this:
Links:
linux debian pulseaudio no sound reboot startup zero percent volume muted – add startup sound
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!