Forum › Forums › New users › New Users and General Questions › trying to get shutdown script to work in IceWM [SOLVED] › Reply To: trying to get shutdown script to work in IceWM [SOLVED]
‘read’ won’t work because the shutdown script is not run in an interactive shell. And the ‘play’ command won’t work if Pipewire is enabled for the reason already mentioned earlier about default ALSA devices. Instead try
AUDIODEV=sysdefault play ~/Music/shutdown.ogg
That’s tested an working on my system even when Pipewire is enabled. “sysdefault” may not be the best ALSA device on every system, especially if you have multiple soundcards. You can test these on a running system without having shutdown or log out by manually killing pipewire with ‘pkill pipewire’, then try setting different devices from ‘aplay -L’ as the AUDIODEV for the sox/play command.
"--"