Bug 104353 - session locking does not disable sound system
Summary: session locking does not disable sound system
Status: RESOLVED WORKSFORME
Alias: None
Product: ksmserver
Classification: Unmaintained
Component: lockscreen (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
: 131703 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-22 05:30 UTC by Nigel McNie
Modified: 2015-02-10 12:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nigel McNie 2005-04-22 05:30:07 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 3.3 
OS:                Linux

I'm not quite sure of KDE policy on this, but...

When I choose "lock session", the screen goes blank. I guess this is to allow me to walk away from my desk or whatever and not have others looking at my screen to see what I'm doing. Which imho is a good thing.

So, what about the sound system? I might be listening to something sensitive through my headphones and lock my session. Would it be possible to make an option to also disable sound when I lock my screen and re-enable it when I unlock?

I don't think this should be the only behaviour, or even the default behaviour. I just suggest it as a possibility. And I don't think the argument that "if it was secure you'd turn it off before locking" is vaild - one for convenience, and two if I'm running KDE off my laptop I would like sound to turn off when I lock my session because I need the battery power.

Just a weeny suggestion :)
Comment 1 Christian Loose 2005-04-23 11:39:58 UTC
Maybe something like "dcop kmix Mixer0 setMasterVolume 0" or "dcop kmix Mixer0 mute 0" could do the trick.
Comment 2 greatbunzinni 2006-10-25 23:23:52 UTC
I was just going to file a wishlist report based on this.

IMHO the KDE desktop locking functionality would benefit if an option to mute the computer was added. For example, I use KDE on a laptop and sometimes I leave it unattended for quite a while, including when I'm listening to music and/or playing games. So when my desktop is locked the computer keeps on playing music/sounds but without a way to turn them off. So, it would be great if, when locking the desktop, KDE also muted KMix. By doing that then there wouldn't be any problem with the sound the laptop produces and, more important, with the unwanted attention that it brings to an unattended computer.
Comment 3 Oswald Buddenhagen 2007-05-18 22:19:06 UTC
*** Bug 131703 has been marked as a duplicate of this bug. ***
Comment 4 Tristan Miller 2007-07-26 15:14:04 UTC
I propose something similar in Bug 148228:  I want to be able to adjust or mute the volume from the locked screen itself.
Comment 5 greatbunzinni 2007-07-28 16:40:29 UTC
That doesn't really scratch the same itch. The intention is to avoid annoying everyone within earshot distance of a system which is locked and reproducing sound, without needing someone to personally do something to the unattended computer.
Comment 6 Richard Hartmann 2008-08-16 19:26:56 UTC
While the ability to change volume while your session is locked might be nice in the 'forgot to stop playing music' cases (for others, not you), the suggestion made here is, imo, vital.

There are several cases where sounds can tell people something about your session which you do not want them to know. As OP said, this should be optional, not the default.
Comment 7 Chani 2008-12-17 20:08:19 UTC
yes, this is different from bug #148228 - plasmoids can solve that bug, but not this one.

I think this is a valid feature request, but I don't have time to implement it myself. it also makes me wonder if there are other things that should be locked when the session is locked.
Comment 8 Angel Blue01 2009-03-11 19:13:49 UTC
I'd like the system to put Pidgin (or at least Kopete) in Away status for all protocols when it locks the screen ;-)
(In reply to comment #7)
> yes, this is different from bug #148228 - plasmoids can solve that bug, but not
> this one.
> 
> I think this is a valid feature request, but I don't have time to implement it
> myself. it also makes me wonder if there are other things that should be locked
> when the session is locked.
Comment 9 Martin Flöser 2015-02-06 07:22:08 UTC
Git commit 0b48b72c2282ec19dac86647d36772e355b54163 by Martin Gräßlin.
Committed on 04/02/2015 at 08:56.
Pushed by graesslin into branch 'master'.

[screenlocker] Support global shortcuts in the lock screen

This change implements support for white listed global shortcuts in
the lock screen. It interacts with KGlobalAccel to fetch shortcuts
and checks them when a key is pressed. For more detailed information
on how this functions, please see the documentation added to the new
file globalacel.h.

So far only shortcuts from kmix are white listed. This allows to
mute and change volume while the screen is locked.
Related: bug 198097, bug 148228
FIXED-IN: 5.3.0
REVIEW: 122419

M  +2    -0    ksmserver/screenlocker/CMakeLists.txt
M  +3    -1    ksmserver/screenlocker/autotests/CMakeLists.txt
A  +237  -0    ksmserver/screenlocker/globalaccel.cpp     [License: GPL (v2)]
A  +106  -0    ksmserver/screenlocker/globalaccel.h     [License: GPL (v2)]
M  +6    -0    ksmserver/screenlocker/ksldapp.cpp
M  +2    -0    ksmserver/screenlocker/ksldapp.h
M  +7    -0    ksmserver/screenlocker/lockwindow.cpp
M  +8    -0    ksmserver/screenlocker/lockwindow.h

http://commits.kde.org/plasma-workspace/0b48b72c2282ec19dac86647d36772e355b54163
Comment 10 Martin Flöser 2015-02-10 12:52:41 UTC
With the commit from comment #9 I think we have a good enough work around for the problem at hand.

Furthermore I'm unsure whether the audio system can and should be disabled based on the lock session. Audio is not bound to the graphical session, but a daemon (e.g. mpd) might be playing music, or other users might be logged in and listening to audio. Overall I don't see a clear audio to graphical session connection.