Linux - How to fold only when screensaver is on - RESOLVED

Moderators: Site Moderators, FAHC Science Team

Post Reply
vince_lewis
Posts: 17
Joined: Fri Dec 09, 2016 11:43 pm

Linux - How to fold only when screensaver is on - RESOLVED

Post by vince_lewis »

Just FYI I am running Ubuntu Studio, and FAH version 7.5.1, and I'm using xscreensaver as my screen saver.

Some users (myself included) find the the fold when Idle on linux doesn't work - it never starts.

I've written a script that I run on startup that addresses this.

Code: Select all

#!/bin/bash
sleep 90
xhost +
DISPLAY=:0 xscreensaver-command -watch | while read -r line
do
# does the result of the last change in xscreensaver status start with BLANK (ie screensaver on) or UNBLANK (screensaver off) ?
if [[ $line == BLANK* ]] 
then
FAHClient --send-unpause
else
FAHClient --send-pause
fi
done

Hopefully this is of use to some of you. Note I had to put this in the crontab for the logged on user, and NOT run it as sudo.
Post Reply