Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 8b70066cd1f50f85cc0b0ca244813d98 > files > 1

ibm-acpi-0.11-4mdv2010.0.noarch.rpm

#!/bin/bash

# Try to find the .Xauthority file used to start the X server
# (based on an idea by David Schweikert <dws@ee.eth.ch>)

PID=`pidof /usr/X11R6/bin/X`
AUTH=`perl -ne'/\x00-auth\x00(.*?)\x00.*/&&print$1' /proc/$PID/cmdline`
if [ x"$AUTH" = x ]; then
    AUTH=`perl -ne'/(^|\x00)XAUTHORITY=(.*?)\x00/&&print$2' /proc/$PID/environ`
fi
export XAUTHORITY=$AUTH

/usr/X11R6/bin/xset -display :0 dpms force standby