Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #240427 > unrolled thread

silence audio on locked screen?

Started byRichard Hector <richard@walnut.gen.nz>
First post2021-09-27 04:30 +0200
Last post2021-09-30 16:40 +0200
Articles 10 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  silence audio on locked screen? Richard Hector <richard@walnut.gen.nz> - 2021-09-27 04:30 +0200
    Re: silence audio on locked screen? "Alexander V. Makartsev" <avbetev@gmail.com> - 2021-09-27 08:30 +0200
    Re: silence audio on locked screen? Dan Ritter <dsr@randomstring.org> - 2021-09-27 12:50 +0200
      Re: silence audio on locked screen? Richard Hector <richard@walnut.gen.nz> - 2021-09-28 10:00 +0200
        Re: silence audio on locked screen? Dan Ritter <dsr@randomstring.org> - 2021-09-28 12:40 +0200
          Re: silence audio on locked screen? Richard Hector <richard@walnut.gen.nz> - 2021-09-29 05:50 +0200
            Re: silence audio on locked screen? Dan Ritter <dsr@randomstring.org> - 2021-09-29 12:50 +0200
            Re: silence audio on locked screen? David Wright <deblis@lionunicorn.co.uk> - 2021-09-30 05:40 +0200
              Re: silence audio on locked screen? rhkramer@gmail.com - 2021-09-30 14:10 +0200
                Re: silence audio on locked screen? Kenneth Parker <sea7kenp@gmail.com> - 2021-09-30 16:40 +0200

#240427 — silence audio on locked screen?

FromRichard Hector <richard@walnut.gen.nz>
Date2021-09-27 04:30 +0200
Subjectsilence audio on locked screen?
Message-ID<D1OyZ-2sx-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#240432

From"Alexander V. Makartsev" <avbetev@gmail.com>
Date2021-09-27 08:30 +0200
Message-ID<D1Sjf-4U2-3@gated-at.bofh.it>
In reply to#240427

[Multipart message — attachments visible in raw view] — view raw

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
⠈⠳⣄⠀⠀⠀⠀

[toc] | [prev] | [next] | [standalone]


#240436

FromDan Ritter <dsr@randomstring.org>
Date2021-09-27 12:50 +0200
Message-ID<D1WmS-7go-7@gated-at.bofh.it>
In reply to#240427
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-

[toc] | [prev] | [next] | [standalone]


#240469

FromRichard Hector <richard@walnut.gen.nz>
Date2021-09-28 10:00 +0200
Message-ID<D2gbT-2tH-1@gated-at.bofh.it>
In reply to#240436
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

[toc] | [prev] | [next] | [standalone]


#240472

FromDan Ritter <dsr@randomstring.org>
Date2021-09-28 12:40 +0200
Message-ID<D2iGK-4aw-13@gated-at.bofh.it>
In reply to#240469
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-

[toc] | [prev] | [next] | [standalone]


#240532

FromRichard Hector <richard@walnut.gen.nz>
Date2021-09-29 05:50 +0200
Message-ID<D2yLv-5tY-3@gated-at.bofh.it>
In reply to#240472
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

[toc] | [prev] | [next] | [standalone]


#240546

FromDan Ritter <dsr@randomstring.org>
Date2021-09-29 12:50 +0200
Message-ID<D2FjY-16O-15@gated-at.bofh.it>
In reply to#240532
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-

[toc] | [prev] | [next] | [standalone]


#240617

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-09-30 05:40 +0200
Message-ID<D2V5o-2wJ-7@gated-at.bofh.it>
In reply to#240532
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.

[toc] | [prev] | [next] | [standalone]


#240633

Fromrhkramer@gmail.com
Date2021-09-30 14:10 +0200
Message-ID<D332X-7ON-31@gated-at.bofh.it>
In reply to#240617
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:

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

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 <darn>)

[toc] | [prev] | [next] | [standalone]


#240650

FromKenneth Parker <sea7kenp@gmail.com>
Date2021-09-30 16:40 +0200
Message-ID<D35o7-F3-37@gated-at.bofh.it>
In reply to#240633

[Multipart message — attachments visible in raw view] — view raw

On Thu, Sep 30, 2021, 8:03 AM <rhkramer@gmail.com> 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:
>
> <quote>
> 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.
> </quote>
>

+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 <darn>)
>

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web