how to replace mate-screensaver by light-locker

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hellwoodfire

how to replace mate-screensaver by light-locker

Post by hellwoodfire »

I replaced my session manager mdm by lightdm (because of the never fixed annoying bug "Mint 17 + mdm + user switch + nvidia = Black Screen" )

Code: Select all

apt-get install lightdm lightdm-gtk-greeter light-locker
apt-get purge mdm
Then my only remaining problem is that when I lock my screen (i am user A), then switch to another to user (user B) from the lightdm login screen, then unlock my own session (user A) in lightdm: a have to unlock again in mate-screensaver. I don't want to unlock again!
How can I completely replace mate-screensaver (I think is executed when we click the lock user-session icon in the mint-menu) by "light-locker" ?
I MEAN, for EXAMPLE when I would like that when I click on the "Lock Screen" button in the MintMenu : it would call light-locker isntead of mate-screensaver.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
hellwoodfire

Re: how to replace mate-screensaver by light-locker

Post by hellwoodfire »

Here is the work around I found:
The lock button in the mint menu is calling "mate-screensaver-command -l"
(source: https://github.com/linuxmint/mintmenu/b ... agement.py)

1) First, please note that I installed lightdm like this:

Code: Select all

sudo add-apt-repository ppa:lightdm-gtk-greeter-team/stable
sudo apt-get update
apt-get install lightdm lightdm-gtk-greeter light-locker light-locker-settings
apt-get purge mdm
* "apt-get purge mdm" is required to allow user switching. I not removed, you get an error message when switching user.

2) I placed a bash file named "mate-screensaver-command" in my /usr/local/bin folder (this location is checked before /usr/bin in the default PATH)
Here is the content:

Code: Select all

#!/bin/bash
if [ $1 == "-l" ] ; then
    dm-tool lock
fi
3) In the mate-screensaver settings I disabled everything (timeout, screensaver, lock, etc)
4) In light-locker-settings I set the lock timeout to 10 minutes.

Now I'm happy for at least 3 reasons:
1) When I click the lock button in the mint menu, it is the light-locker that is executed, not the mate-screensaver.
2) After 10 minutes, it is the light-locker that is executed, not the mate-screensaver.
3) When user A come back from user B (see my previous post), I don't have anymore to enter my password two times.

Others notes:
If you want your lightdm greether look more like Mint MATE: edit "lightdm-gtk-greeter.conf"

Code: Select all

sudo pluma /etc/lightdm/lightdm-gtk-greeter.conf
... and decorerate
* background= (...path to your favorite background located in a folder readable for all users)
* theme-name=Mint-X-Aqua (for example)
* font-name=Noto Sans (this is the defaut Mint font)
Locked

Return to “MATE”