On 27/09/21 11:39 pm, Dan Ritter wrote:
Richard Hector wrote:
I'm using buster with xfce4, pulseaudio, and (I think) light-locker.
When I lock my screen, audio continues to play (and system sounds are still
heard).
This seems to me like a way to leak information, and is also annoying to
anyone nearby. It's then annoying for me when I discover somebody has
unplugged my headphones to make them shut up :-)
Any suggestions for making it be quiet? Perhaps a wishlist bug for
light-locker? I don't know if it's even feasible, given the various
combinations of audio system and screen lockers.
One option is to run a mute and stop-playing command immediately
on screensaver interaction.
For XFCE4, that's as easy as adding a panel object which runs an
application, pointing that at a script, and adding an
appropriate icon. Install xmacro.
~/bin/quiet-and-dark
#!/bin/sh
#not actually tested
echo 'KeyStrPress XF86AudioPlay KeyStrRelease XF86AudioPlay' | xmacroplay :0
echo 'KeyStrPress XF86AudioMute KeyStrRelease XF86AudioMute' | xmacroplay :0
xscreensaver -command activate
You can also assign it to run as a keyboard shortcut.
Thanks Dan,
If I understand correctly, you're suggesting to create a clickable
button which will mute the audio, and then creating a macro to do that
from within a script, which I then need to run manually?
I see two issues there, which were admittedly not in my original
statement of requirements :-)
I'd like this to still happen if the screen locks due to inactivity. I
haven't found yet what triggers that, or where to configure the timeout.
Secondly, will it re-enable audio when the screen is unlocked?
Cheers,
Richard