Created
October 1, 2014 15:05
-
-
Save ravishi/c039081aae182c42407e to your computer and use it in GitHub Desktop.
Fix "Lock screen" in ElementaryOS Freya
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Stupidly simple script to fix the lockscreen option in ElementaryOS Freya. | |
# It listens to a dbus event and calls `dm-tool lock`. | |
# | |
# Run it in the background and lock your screen whenever you want! | |
# | |
# $ freya-lock-fix.sh & | |
# $ disown | |
# -> Lock screen | |
# | |
# Note that Super+L still doesn't work. | |
interface=com.canonical.Unity.Session | |
member=Lock | |
skip=0 | |
dbus-monitor --profile "interface='$interface',member='$member'" | | |
while read -r line; do | |
if [ "$skip" == "0" ]; then | |
skip=1 | |
else | |
dm-tool lock & | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment