Skip to content

Instantly share code, notes, and snippets.

@thecjharries
Last active April 26, 2017 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecjharries/a1a8eaa8ca7e3c97dcf86ff83d531e79 to your computer and use it in GitHub Desktop.
Save thecjharries/a1a8eaa8ca7e3c97dcf86ff83d531e79 to your computer and use it in GitHub Desktop.
change-kde-4-screen-locker-background.sh
#!/bin/bash
# I sourced most of this stuff (i.e. both the commands but sed instead of leafpad) from
# https://www.maketecheasier.com/customize-kde-lock-screen/
# Gotta be using KDE 4 because this probaably doesn't work on other versions
# Image needs to be in Desktop because I'm too lazy to make it dynamic
# TODO: make this a help option
# usage:
# 1. Either symlink this to a /bin somewhere or just copy the script
# 2. Make sure to chmod +x <script>
# 3. <script> <image.ext>
# 4. ???
# Copy the image to its new home
sudo cp /home/$USERNAME/Desktop/$1 /usr/share/kde4/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui
# Update the qml file with the new background
sudo sed -i "s/source: .*/source: '${1}'/g" /usr/share/kde4/apps/ksmserver/screenlocker/org.kde.passworddialog/contents/ui/main.qml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment