Xorg

Configuration

20-monitor.conf

Lock the screen

Using xsecurelock as an alternative to xscreensaver

Let's create a wrapper script: ~/bin/mylock A symlink to the lock program I currently use

#!/bin/sh
env XSECURELOCK_SAVER=saver_blank XSECURELOCK_PASSWORD_PROMPT=time /usr/bin/xsecurelock

keep the screen locked when restoring the computer from suspension

elogind

Put the following script to /lib64/elogind/system-sleep/xsecurelock:

#!/bin/bash
#!/bin/bash
export DISPLAY=":0"
export XAUTHORITY="/home/allosaurus/.Xauthority"
case $1/$2 in
  pre/*)
    su allosaurus -c '/home/allosaurus/bin/mylock &> /tmp/system-sleep.log &'
    # echo "Locking" >> /tmp/system-sleep.log &
    sleep 1
    ;;
  post/*)
    pkill -x -USR2 xsecurelock
    echo "Locking off" >> /tmp/system-sleep.log
    ;;
esac

And make it executable. This will send SIGUSR2 signal to the xsecurelock process.

DPI

Calculators

  • dpi.lv