Re: silence audio on locked screen?

2021-09-30 Thread Kenneth Parker
On Thu, Sep 30, 2021, 8:03 AM  wrote:

> On Wednesday, September 29, 2021 11:34:42 PM David Wright wrote:
> > On Wed 29 Sep 2021 at 16:48:11 (+1300), Richard Hector wrote:
> > > As I say, I consider this to be a security flaw - people can hear
> > > something of what my computer's doing when I'm not there and it's
> > > supposedly locked.
> > >
> > > Do others agree with that?
> >
> > No (ie I concur with Dan).
>
> It would have been helpful (to me, at least) if you had quoted Dan, which
> I am
> now doing:
>
> 
> It can be a security issue, but it can also be desired
> behavior. I have an old laptop in my living room which has the
> sole purpose of being connected to my stereo to play music. I
> would be rather upset if it were to pause whenever the
> screensaver kicks in.
>
> So I would class this as a desirable configurable element.
> 
>

+1

>
> Insofar as it is apparently not a configurable element, I would consider
> it a
> security issue at least, and would (if I were the OP) file a bug or an RFP
> (if
> that is the right acronym (Request For )
>

I also often play Classical Music (i.e.  Symphonies and Operas), and also
prefer to "start it" interactively (I use the Command Line "play" Command,
found in the sox Package), but then let it fill my alarm, while the Power
Save actions (Display to Sleep, and system Locked, in case I have
visitors).  And then, when the Piece ends, I unlock the Display and,
perhaps play something else.

So this *has* to be Configurable.

Kenneth Parker


Re: silence audio on locked screen?

2021-09-30 Thread rhkramer
On Wednesday, September 29, 2021 11:34:42 PM David Wright wrote:
> On Wed 29 Sep 2021 at 16:48:11 (+1300), Richard Hector wrote:
> > As I say, I consider this to be a security flaw - people can hear
> > something of what my computer's doing when I'm not there and it's
> > supposedly locked.
> > 
> > Do others agree with that?
> 
> No (ie I concur with Dan).

It would have been helpful (to me, at least) if you had quoted Dan, which I am 
now doing:


It can be a security issue, but it can also be desired
behavior. I have an old laptop in my living room which has the
sole purpose of being connected to my stereo to play music. I
would be rather upset if it were to pause whenever the
screensaver kicks in.

So I would class this as a desirable configurable element.


Insofar as it is apparently not a configurable element, I would consider it a 
security issue at least, and would (if I were the OP) file a bug or an RFP (if 
that is the right acronym (Request For )



Re: silence audio on locked screen?

2021-09-29 Thread David Wright
On Wed 29 Sep 2021 at 16:48:11 (+1300), Richard Hector wrote:

> As I say, I consider this to be a security flaw - people can hear
> something of what my computer's doing when I'm not there and it's
> supposedly locked.
> 
> Do others agree with that?

No (ie I concur with Dan).

> Also, I don't know how much of the screen locking function is shared
> between the many tools that are available for this purpose. Ideally,
> this problem (if it's a problem) should be fixed in all such tools.
> 
> Does it sound reasonable then to submit a bug report to light-locker,
> with the suggestion that the maintainers contact the maintainers of
> similar/related packages as they see fit?

It might be worth reading around dbus: there may be hooks for running
scripts whenever locking changes the state, however caused. This would
probably only cover X11, not console blanking or monitors' green
behaviour. And for vlock (deliberate locking), a script to mute/restore.

Cheers,
David.



Re: silence audio on locked screen?

2021-09-29 Thread Dan Ritter
Richard Hector wrote: 
> However, I'm reluctant to embark on one-off efforts, partly because I don't
> understand enough of the underlying structure, and partly because it only
> solves it for me (if I understood more, maybe I could contribute back, but I
> don't).
> 
> As I say, I consider this to be a security flaw - people can hear something
> of what my computer's doing when I'm not there and it's supposedly locked.
> 
> Do others agree with that?

It *can* be a security issue, but it can also be desired
behavior. I have an old laptop in my living room which has the
sole purpose of being connected to my stereo to play music. I
would be rather upset if it were to pause whenever the
screensaver kicks in.

So I would class this as a desirable configurable element.

> Also, I don't know how much of the screen locking function is shared between
> the many tools that are available for this purpose. Ideally, this problem
> (if it's a problem) should be fixed in all such tools.

There are at least four independent things.

There is the Linux console, which has a configurable blanker.

There is the X11 blanking mechanism, which can be controlled by
xset and can optionally invoke DPMS to turn off a monitor.

There are competing screensaver implementations: Xscreensaver
and lightlocker, gnome-screensaver, mate-screensaver,
ukui-screensaver, and probably others.

> Does it sound reasonable then to submit a bug report to light-locker, with
> the suggestion that the maintainers contact the maintainers of
> similar/related packages as they see fit?


You could do that. They would probably think of this as a
feature request.

-dsr-



Re: silence audio on locked screen?

2021-09-28 Thread Richard Hector

On 28/09/21 11:33 pm, Dan Ritter wrote:

Richard Hector wrote:

On 27/09/21 11:39 pm, Dan Ritter wrote:
> 
> 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?


That sounds inverted. The button executes a script when you
click it; the script mutes and pauses audio, then activates the
screensaver.

There might be a way to invoke the mute-and-pause from the
screensaver when it activates by itself, but I don't know that
one and a few minutes searching didn't reveal it.


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.


That's in Settings, Screensaver. Try right clicking on an empty
area of desktop.


Secondly, will it re-enable audio when the screen is unlocked?


This won't, but the same invocations without the final
screensaver activation will un-mute and start playing whatever
is listening to XF86 media keys.


Thanks Dan, I think I understand some of that.

However, I'm reluctant to embark on one-off efforts, partly because I 
don't understand enough of the underlying structure, and partly because 
it only solves it for me (if I understood more, maybe I could contribute 
back, but I don't).


As I say, I consider this to be a security flaw - people can hear 
something of what my computer's doing when I'm not there and it's 
supposedly locked.


Do others agree with that?

Also, I don't know how much of the screen locking function is shared 
between the many tools that are available for this purpose. Ideally, 
this problem (if it's a problem) should be fixed in all such tools.


Does it sound reasonable then to submit a bug report to light-locker, 
with the suggestion that the maintainers contact the maintainers of 
similar/related packages as they see fit?


Cheers,
Richard



Re: silence audio on locked screen?

2021-09-28 Thread Dan Ritter
Richard Hector wrote: 
> On 27/09/21 11:39 pm, Dan Ritter wrote:
> > 
> > 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?

That sounds inverted. The button executes a script when you
click it; the script mutes and pauses audio, then activates the
screensaver.

There might be a way to invoke the mute-and-pause from the
screensaver when it activates by itself, but I don't know that
one and a few minutes searching didn't reveal it.

> 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.

That's in Settings, Screensaver. Try right clicking on an empty
area of desktop.

> Secondly, will it re-enable audio when the screen is unlocked?

This won't, but the same invocations without the final
screensaver activation will un-mute and start playing whatever
is listening to XF86 media keys.

-dsr-



Re: silence audio on locked screen?

2021-09-28 Thread Richard Hector

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



Re: silence audio on locked screen?

2021-09-27 Thread Dan Ritter
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-



Re: silence audio on locked screen?

2021-09-27 Thread Alexander V. Makartsev

On 27.09.2021 07:20, Richard Hector wrote:

Hi all,

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.


Cheers,
Richard

You can assign a special key to mute\unmute sound in xfce 'Keyboard' 
settings and mute audio manually before you lock screen. Pressing the 
same key again will unmute audio.

Choose among one of the F* keys or a key combination.
Exact command will be:
    pactl set-sink-mute @DEFAULT_SINK@ toggle

Note: "@DEFAULT_SINK@" is a special variable for pulseaudio that points 
to default sink. (duh..)


--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄



silence audio on locked screen?

2021-09-26 Thread Richard Hector

Hi all,

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.


Cheers,
Richard