Article 5C87S elogind and lock before suspend

elogind and lock before suspend

by
Tonus
from LinuxQuestions.org on (#5C87S)
Hi all,

Running no power management tool with my WM and was looking for transition from pm-* commands to new elogind ones.

To lock before suspend, elogind uses scripts in /lib{,64}/elogind/system-sleep/

To auto-lock, a simple script like this should do the trick (single user board here, thank you for improvements if you know some)
Code:username=<YOUR_USERNAME>
userhome=/home/$username
export XAUTHORITY="$userhome/.Xauthority"
export DISPLAY=":0"

/usr/bin/xautolock -locknow &
sleep 1s;I will look for more universal way since telling the username varaiable isn't very reliable...latest?d=yIl2AUoC8zA latest?i=gj7FuEKuoq0:QWPVB9SrdFw:F7zBnMy latest?i=gj7FuEKuoq0:QWPVB9SrdFw:V_sGLiP latest?d=qj6IDK7rITs latest?i=gj7FuEKuoq0:QWPVB9SrdFw:gIN9vFwgj7FuEKuoq0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments