avoid leaking user wallpaper on lightdm lock screen
Forum rules
Before you post please read how to get help
Before you post please read how to get help
Re: avoid leaking user wallpaper on lightdm lock screen
I can talk you that process if you like - it's pretty straightforward. Not right now unfortunately - I'm on dinner duties this evening.....
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: avoid leaking user wallpaper on lightdm lock screen
Hi - so here is the background script method.
1) Make your local bin directory
2) Write the script file. This is a single copy and paste command into the terminal.
3) Edit the script to set your preferred STATIC_BACKGROUND
4) Make the script executable
5) Write the autostart entry - another single copy / paste command
6) Install qdbus
7) Log out and log back in. Wait 30 seconds then lock the computer and test the lock screen.
1) Make your local bin directory
Code: Select all
mkdir -p ~/.local/bin
Code: Select all
tee ~/.local/bin/mate_lock_background.sh <<'EOB'
#!/bin/bash
# Script to set a custom background for the MATE lockscreen
# Save the script as ~/.local/bin/mate_lock_background.sh and make executable
# Add a entry to Startup Applications to launch the script after user login with a delay of 30 seconds
# Install dependency qdbus - apt install qdbus
# These variables are intended to be set by the end user.
# Set STATIC_BACKGROUND to the path to your image of choice for the lockscreen background
STATIC_BACKGROUND="/usr/share/backgrounds/linuxmint/default_background.jpg"
# Main script starts here
# Check for existing instances and kill them leaving current instance running
for PID in $(pidof -o %PPID -x "${0##*/}"); do
if [ "$PID" != $$ ]; then
kill -9 "$PID"
fi
done
# set initial status
ACTIVE=false
# Start the main loop to monitor screensaver status changes
dbus-monitor --profile "interface='org.mate.ScreenSaver', member='ActiveChanged'" | while read -r
do
# Screensaver active loop.
while $(qdbus org.mate.ScreenSaver /org/mate/ScreenSaver org.mate.ScreenSaver.GetActive) == true
do
# If screensaver just activated get user background and set static lock screen background
if ( ! $ACTIVE ) ; then
DESK_BACKGROUND=$(gsettings get org.mate.background picture-filename)
gsettings set org.mate.background picture-filename "$STATIC_BACKGROUND"
ACTIVE=true
fi
sleep 1
done
# Set background back to the user background on screensaver de-activation
if ( $ACTIVE ) ; then
gsettings set org.mate.background picture-filename "$DESK_BACKGROUND"
ACTIVE=false
fi
done
EOB
Code: Select all
xed ~/.local/bin/mate_lock_background.sh
Code: Select all
chmod +x ~/.local/bin/mate_lock_background.sh
Code: Select all
tee ~/.config/autostart/mate_lock_background.desktop <<'EOB'
[Desktop Entry]
Type=Application
Exec=mate_lock_background.sh
X-GNOME-Autostart-enabled=true
NoDisplay=false
Hidden=false
Name=mate_lock_background.desktop
Comment=Sets a custom lockscreen background for MATE.
X-GNOME-Autostart-Delay=30
EOB
Code: Select all
apt install qdbus
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: avoid leaking user wallpaper on lightdm lock screen
This is the modify and recompile mate-screensaver method to revert to the lockscreen always using the default system background.
1) Open Software Sources Application via the menu - Check Source Code repositories
Open a terminal and
2) Make and enter a working directory
3) Download the mate-screensaver source-code
4) Enter the source code directory (note the version string string is specific to MATE on Mint 19.3)
5) Install build dependencies
6) Modify the source code with a text editor. So if we are going to revert https://github.com/mate-desktop/mate-sc ... 2d361eb27f we need to...
And revert the changes noted in that commit. The line numbers are the same bar the last one which is line 1941 in the current version.
Save and exit the text editor having made the modifications.
7) This particular package will complain about the modifications unless you commit your local patch and specify a patch name. Run
Follow the prompts, name the patch something like mate_lock_background, and save / exit the terminal text editor.
8) Recompile from the modified source. Ignore any error at the end about failing to sign the package.
9) Install the modified debs just made.
10) Reboot and test.
1) Open Software Sources Application via the menu - Check Source Code repositories
Open a terminal and
2) Make and enter a working directory
Code: Select all
mkdir -p $HOME/mate-screensaver-mod; cd $HOME/mate-screensaver-mod
Code: Select all
apt source mate-screensaver
Code: Select all
cd mate-screensaver-1.22.2
Code: Select all
apt build-dep mate-screensaver
Code: Select all
xed $HOME/mate-screensaver-mod/mate-screensaver-1.22.2/src/gs-manager.c
Save and exit the text editor having made the modifications.
7) This particular package will complain about the modifications unless you commit your local patch and specify a patch name. Run
Code: Select all
dpkg-source --commit
8) Recompile from the modified source. Ignore any error at the end about failing to sign the package.
Code: Select all
apt build
Code: Select all
cd ..; apt deb *.deb
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: avoid leaking user wallpaper on lightdm lock screen
hey smurphos, thanks a lot for such actionable intel! I'll try and play around with it.
in the mean time, I really hope someone might pop up with a one-liner or, even better, a proper MATE/lightdm setting for it.
in the mean time, I really hope someone might pop up with a one-liner or, even better, a proper MATE/lightdm setting for it.

Re: avoid leaking user wallpaper on lightdm lock screen
Cinnamon has the same behaviour.
Currently, I can disable displaying user's background on the login screen, but not on the lock screen.