[solved?] how to lock screen on resume from suspend?

Archived topics about LMDE 1 and LMDE 2
Locked
TomRoche

[solved?] how to lock screen on resume from suspend?

Post by TomRoche »

I recently upgraded a laptop to UP4 and have been evaluating GNOME3, Cinnamon, and MATE. One problem I'm having with MATE (but not Cinnamon) is, when I resume from suspend/sleep (which is several times/day), I *do not* get a password prompt, which I very much want. How to make that happen? Note that
  1. setting

    Code: Select all

    $ gconftool --type Boolean --set /apps/gnome-power-manager/lock/suspend true
    does nothing (though I can subsequently) see that setting in gconf-editor
  2. I can't see anything relevant to set in dconf-editor
One thing I *do* like about MATE is, C-A-D locks the screen, so I know that is working. But unfortunately I can't suspend *after* locking the screen.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
CptMidnight

Re: how to lock screen on resume from suspend?

Post by CptMidnight »

I think I just discovered the answer, thanks to the clue in your Boolean string. When you go to MATE's configuration manager, you'll note that the suspend function has a second condition:

Image

And use_screensaver_settings is enabled by default.

You can disable it, or you can allow the screensaver config to determine behavior:

Image

That function circled in the second screenshot is disabled by default. Enabling it will force a password prompt on resume, even though resume should have nothing to do with the screensaver.
TomRoche

solution raises more questions than it answers

Post by TomRoche »

CptMidnight wrote:I think I just discovered the answer, thanks to the clue in your Boolean string. When you go to MATE's configuration manager, you'll note that the suspend function has a second condition:
Well, that is interesting! though unfortunately, it raises more questions than it answers ...

First off, I see no /apps/mate-power-manager in my gconf-editor. Why is that? I first thought it might not be installed, but

Code: Select all

me@it:~$ sudo aptitude install mate-power-manager
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
                                         
me@it:~$ mate-power-manager &
TI:18:52:20	TH:0x220a940	FI:gpm-main.c	FN:main,250
 - Power Manager is already running in this session.
Traceback:
	mate-power-manager() [0x41a3b7]
	mate-power-manager() [0x408971]
	/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f5b179a8ead]
	mate-power-manager() [0x408b85]
So why does it have no keys in gconf-editor? (Or, for that matter, in dconf-editor, but I don't understand why I have both of those--another question.)
CptMidnight wrote:use_screensaver_settings is enabled by default.
But not in my gconf:

Image

Which raises yet another question: why do I have no documentation or schema for any of my gconf-editor keys?

However you are correct that, after setting System>Preferences>Screensaver>Lock screen when screensaver is active

Image

I do indeed get screenlock on resume from suspend--thanks!
CptMidnight

Re: solution raises more questions than it answers

Post by CptMidnight »

TomRoche wrote: Well, that is interesting! though unfortunately, it raises more questions than it answers ...

First off, I see no /apps/mate-power-manager in my gconf-editor. Why is that?
Well, I used mate-conf-editor to investigate the settings and change them. I don't think it's built into the LMDE image, but it's at least in the repos.
TomRoche wrote:I do indeed get screenlock on resume from suspend--thanks!
Well, I'm glad we figured that out, at least :)
TomRoche

Re: solution raises more questions than it answers

Post by TomRoche »

CptMidnight wrote:I used mate-conf-editor to investigate the settings and change them. I don't think it's built into the LMDE image, but it's at least in the repos.
Correct, at least for me: I had to install package=mate-conf-editor in order to run program=mateconf-editor. And, interestingly, mateconf-editor keys have documentation.
jorgkare

Re: [solved?] how to lock screen on resume from suspend?

Post by jorgkare »

Hello- I'm very fresh in Linux, but based upon what you have posted here I found a way to activate the password after screensaver, or after the laptop lid have been closed.
Go to the Configuration editor, apps, then choose mate-screensaver then activate the lock_enabled.
Voila, now it should work.
Glad I found it, after being a windows user for such a long time, the Terminal isn't my 'cup of tea'.
Locked

Return to “LMDE Archive”