[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: silence audio on locked screen?



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.

-dsr-


Reply to: