Même après avoir configuré mon KDE pour désactiver la mise en veille de l'écran, j'ai toujours ce problème. Sans doute l'écran se met tout seul en veille quand il voit que rien ne bouge.
J'ai donc écrit un petit script pour faire bouger la souris régulièrement afin d'éviter la mise en veille.
Il nécessite le paquet xdotool et doit fonctionner sur tous les linux.
#!/bin/bash
#===============================================================================
#
# FILE: mouseMove.sh
#
# USAGE: ./mouseMove.sh
#
# DESCRIPTION: Makes little mouse moves every 2 minutes (because I can't
# configure my laptop to avoid screen to turn off).
# It moves the cursors from coordinates X,Y to X+1,Y+1 and then
# move the cursor back to X,Y
#
# OPTIONS: --- A sleep time can be supplied (default is 2 minutes)
# REQUIREMENTS: --- xdotool package
# BUGS: ---
# NOTES: --- May be done much more elegantly
# AUTHOR: (),
# COMPANY:
# VERSION: 1.0
# CREATED: 16/08/2009 21:37:13 CEST
# REVISION: ---
#===============================================================================
if [ $# -ne 1 ]
then
SLEEP=120
else
SLEEP=$1
fi
if [ `echo $1 |grep "\\-h"` ]
then
echo "Usage : $0"
echo "If no sleep time is supplied 2 minutes is default"
exit 1
fi
while [ 1 ]
do
X=`xdotool getmouselocation |cut -d : -f 2 |cut -d " " -f 1`
Y=`xdotool getmouselocation |cut -d : -f 3 |cut -d " " -f 1`
XPP=$((X+1))
YPP=$((Y+1))
xdotool mousemove ${XPP} ${YPP}
xdotool mousemove ${X} ${Y}
sleep ${SLEEP}
done
Aucun commentaire:
Enregistrer un commentaire