You are not logged in.

#1 2014-02-26 21:24:32

tkdncty2
Member
Registered: 2012-05-24
Posts: 24

What could be wrong with my lightsOn.sh?

I'm trying to set up the lightsOn.sh script, so my screen won't black out while watching youtube videos.

I open up a terminal, run the script for example with "./bin/lightsOn.sh 280 &" and when there is time for the script to check the screen, it displays the "how to use" part of the command "xprop"

usage:  xprop [-options ...] [[format [dformat]] atom] ...

where options include:
    -grammar                       print out full grammar for command line
    -display host:dpy              the X server to contact
    -id id                         resource id of window to examine
    -name name                     name of window to examine
    -font name                     name of font to examine
    -remove propname               remove a property
    -set propname value            set a property to a given value
    -root                          examine the root window
    -len n                         display at most n bytes of any property
    -notype                        do not display the type field
    -fs filename                   where to look for formats for properties
    -frame                         don't ignore window manager frames
    -f propname format [dformat]   formats to use for property of given name
    -spy                           examine window properties forever

and it doesn't work in preventing screen blanking.


Here is the script:

http://pastebin.com/xh3d5Fze


I'm using Xscreensaver and Firefox.


Do you know what could be the problem?

Last edited by tkdncty2 (2014-02-26 21:26:21)

Offline

#2 2014-02-27 19:03:00

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: What could be wrong with my lightsOn.sh?

So, I guess xprop is not given all info. I guess that the variable activ_win_id is not always properly set. Especially the last line in this codeblock might need some further inspection?

        #get id of active window and clean output
        activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
        #activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
        activ_win_id=${activ_win_id:40:9}

fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

Board footer

Powered by FluxBB