Open gsgatlin opened 9 years ago
Oh I was already going to file this request myself :smile:
Yes, I think this should be configurable. Not sure which app should actually handle this though. In Cinnamon, lock-on-suspend
key is handled in c-s-d's power plugin...
@clefebvre @flexiondotorg @raveit65 thoughts guys?
Either power manager or screensaver.
I prefer m-s itself in gui and as gsettings key, so users don't have to search in m-p-m. Note, there are gsettings keys in m-p-m for locking actions, but they don't work anymore on systems with systemd and newer upower. Don't know if they work on older intvs systems.
+1 for 1.14 or as bug-fix to 1.12.x.
In the code, that belongs to MPM.
Visually that setting could be in the lockscreen or power management.. either way.
@gsgatlin: the offending commit has been reverted. We'll work more on this in the future (e.g. correct enabling/disabling of locking, possible reorganization of gsettings keys to make things simpler, etc.) - so I'll leave this issue open as a reminder.
I add my note here.
I want to only enable lock when resuming from suspend/hibernate, not when my screensaver activates, nor when I close my laptop lid which causes a blank screen.
Currently this can only be done through gsettings and it's not very intuitive (I'm very glad it works though). You have to put screensaver/lock-enabled to false and set these keys in power-manager section:
As stated by @raveit65, it would be nice to control this stuff from UI. In my opinion, the whole locking settings should be presented to the user through a single window, not from separate screensaver/powermanager settings.
From my user point of view, I would like to see a "Lock Screen" entry in mate control center. From there, a list of checkboxes should control lock policy. "Lock when":
@emanuele-f:
Lock Screen
in Cinnamon Settings as well.For the benefit of the next poor bastard who
gsettings
hopefully the following bash
scriptlets will save you some time:
# find relevant `gsettings` keys
date
for SCHEMA in $(gsettings list-schemas | fgrep -e 'mate' | grep -e 'screensaver\|power-manager') ; do
echo "schema=${SCHEMA} keys:"
gsettings list-keys "${SCHEMA}" | fgrep -e 'lock' | sort
echo # newline
done
should produce console spew like
Tue Feb 14 23:03:12 MST 2017 schema=org.mate.power-manager keys: lock-blank-screen lock-hibernate lock-keyring-hibernate lock-keyring-suspend lock-suspend lock-use-screensaver
schema=org.mate.screensaver keys: lock-delay lock-dialog-theme lock-enabled
# query writability and state of relevant `gsettings` keys
date
for SCHEMA in $(gsettings list-schemas | fgrep -e 'mate' | grep -e 'screensaver\|power-manager') ; do
echo "schema=${SCHEMA} keys:"
for KEY in $(gsettings list-keys "${SCHEMA}" | fgrep -e 'lock' | sort) ; do
KEY_V="$(gsettings get "${SCHEMA}" "${KEY}")"
KEY_W="$(gsettings writable "${SCHEMA}" "${KEY}")"
echo " value(${KEY})=${KEY_V}"
echo "writable(${KEY})=${KEY_W}"
done
echo # newline
done
should produce console spew like
Tue Feb 14 23:16:45 MST 2017 schema=org.mate.power-manager keys: value(lock-blank-screen)=true writable(lock-blank-screen)=true value(lock-hibernate)=true writable(lock-hibernate)=true value(lock-keyring-hibernate)=true writable(lock-keyring-hibernate)=true value(lock-keyring-suspend)=false writable(lock-keyring-suspend)=true value(lock-suspend)=true writable(lock-suspend)=true value(lock-use-screensaver)=true writable(lock-use-screensaver)=true
schema=org.mate.screensaver keys: value(lock-delay)=0 writable(lock-delay)=true value(lock-dialog-theme)='default' writable(lock-dialog-theme)=true value(lock-enabled)=false writable(lock-enabled)=true
# set relevant `gsettings` keys
date
gsettings set org.mate.screensaver lock-enabled false
gsettings set org.mate.power-manager lock-blank-screen false
gsettings set org.mate.power-manager lock-use-screensaver false
gsettings set org.mate.power-manager lock-suspend true
gsettings set org.mate.power-manager lock-hibernate true
should produce almost no console spew (just the date)
# requery values (only)
date
for SCHEMA in $(gsettings list-schemas | fgrep -e 'mate' | grep -e 'screensaver\|power-manager') ; do
echo "schema=${SCHEMA} keys:"
for KEY in $(gsettings list-keys "${SCHEMA}" | fgrep -e 'lock' | sort) ; do
KEY_V="$(gsettings get "${SCHEMA}" "${KEY}")"
# KEY_W="$(gsettings writable "${SCHEMA}" "${KEY}")"
echo " value(${KEY})=${KEY_V}"
# echo "writable(${KEY})=${KEY_W}"
done
echo # newline
done
should produce console spew like
Tue Feb 14 23:29:53 MST 2017 schema=org.mate.power-manager keys: value(lock-blank-screen)=false value(lock-hibernate)=true value(lock-keyring-hibernate)=true value(lock-keyring-suspend)=false value(lock-suspend)=true value(lock-use-screensaver)=false
schema=org.mate.screensaver keys: value(lock-delay)=0 value(lock-dialog-theme)='default' value(lock-enabled)=false
At which point, you should be able to
... at least, it WFM :-)
@emanuele-f:
- thanks for pointing me to the relevant tool and data to accomplish this task in current MATE.
- FWIW, I concur with your UI design; for that matter I would appreciate a single dialog=
Lock Screen
in Cinnamon Settings as well.For the benefit of the next poor bastard who
- websearches their way here before UI is implemented
- has never used
gsettings
hopefully the following
bash
scriptlets will save you some time:
Tom, I may be the next poor bastard of which you speak!
I am experiencing an issue from a fresh install of 20.04.1 yesterday, where I do not receive a password prompt when waking from suspend if I have suspended from the power menu, or with systemctl suspend, although a password is requested when waking if I suspend by closing the lid.
My current enabled settings are:
/org/mate/power-manager/ >> lock-suspend, lock-blank-screen, lock-use-screensaver, lock-keyring-suspend, lock-use-screensaver
/org/mate/screensaver/ >> lock-delay = 1, lock-enabled
/org/gnome/desktop/screensaver/ >> lock-delay = 0, lock enabled, ubuntu-lock-on-suspend
I tried the scripts but this did not help:
daire@apparatus:~/Downloads$ chmod +x script1.sh
daire@apparatus:~/Downloads$ ./script1.sh
Thu 10 Sep 2020 16:12:42 IST
schema=org.mate.screensaver keys:
lock-delay
lock-dialog-theme
lock-enabled
schema=org.mate.power-manager keys:
lock-blank-screen
lock-hibernate
lock-keyring-hibernate
lock-keyring-suspend
lock-suspend
lock-use-screensaver
daire@apparatus:~/Downloads$ chmod +x script2.sh
daire@apparatus:~/Downloads$ ./script2.sh
Thu 10 Sep 2020 16:13:38 IST
schema=org.mate.screensaver keys:
value(lock-delay)=0
writable(lock-delay)=true
value(lock-dialog-theme)='default'
writable(lock-dialog-theme)=true
value(lock-enabled)=false
writable(lock-enabled)=true
schema=org.mate.power-manager keys:
value(lock-blank-screen)=false
writable(lock-blank-screen)=true
value(lock-hibernate)=true
writable(lock-hibernate)=true
value(lock-keyring-hibernate)=true
writable(lock-keyring-hibernate)=true
value(lock-keyring-suspend)=false
writable(lock-keyring-suspend)=true
value(lock-suspend)=true
writable(lock-suspend)=true
value(lock-use-screensaver)=false
writable(lock-use-screensaver)=true
daire@apparatus:~/Downloads$ chmod +x script3.sh
daire@apparatus:~/Downloads$ ./script3.sh
Thu 10 Sep 2020 16:14:23 IST
daire@apparatus:~/Downloads$ chmod +x script4.sh
daire@apparatus:~/Downloads$ ./script4.sh
Thu 10 Sep 2020 16:14:59 IST
schema=org.mate.screensaver keys:
value(lock-delay)=0
value(lock-dialog-theme)='default'
value(lock-enabled)=false
schema=org.mate.power-manager keys:
value(lock-blank-screen)=false
value(lock-hibernate)=true
value(lock-keyring-hibernate)=true
value(lock-keyring-suspend)=false
value(lock-suspend)=true
value(lock-use-screensaver)=false
Is there anything else I could try?
Any chance you guys will implement a setting so that the screen won't always lock when you wake up from suspend on systemd distros like fedora?
I tried running dconf-editor and changing:
org -> mate -> power-manager
lock-blank-screen (unchecked) lock-hibernate (unchecked) lock-keyring-hibernate (unchecked) lock-keyring-suspend (unchecked) lock-suspend (unchecked) lock-use-screensaver (unchecked)
and also
org -> mate -> screensaver
lock-enabled (unchecked)
and changing these settings has no effect. It still always locks the screen when it wakes from suspend.
Cheers.