Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
powersave
> powersave-fix-xgl-detection.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File powersave-fix-xgl-detection.patch of Package powersave
--- scripts/wttyhx +++ scripts/wttyhx @@ -96,7 +96,7 @@ /usr/X11R6/bin/XFree86) VERSION[$n]=4 ;; /usr/X11R6/bin/Xorg) VERSION[$n]=4 ;; /usr/bin/Xorg) VERSION[$n]=4 ;; - /usr/bin/Xgl) VERSION[$n]=4 ;; + */bin/Xgl) VERSION[$n]=4 ;; /usr/X11R6/bin/X) VERSION[$n]=3 ;; *) continue ;; esac @@ -107,11 +107,18 @@ < $PID/stat UTIME[$n]=$utime # Then look for the tty that hosts X - for FD in $PID/fd/*; do + for FD in $PID/fd/* none; do FDL=`readlink $FD` test "${FDL%[0-9]*}" = "/dev/tty" && break done - XTTYS[$n]=${FDL#/dev/tty} + if [ "$FD" != none ] ; then + XTTYS[$n]=${FDL#/dev/tty} + else + # special for Xgl + for WORD in `cat $PID/cmdline| tr '\0' ' '`; do + test "${WORD%[0-9]*}" = "vt" && XTTYS[$n]=${WORD#vt} + done + fi # Get the display number from the commandline DISP=`tr '\0' '\40' < $PID/cmdline | sed 's#^.*:\([0-9]\+\).*$#\1\n#'` DISP_PROC[$n]=$DISP