Req disable xscreensaver when xbmc is running
#1
Lightbulb 
For those of us not using a full time XBMC machine, having an option for xbmc to disable the DE's screensaver would be very nice. Mplayer can do this via a line in its config file, for example ~/.mplayer/config

For xscreensaver: heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"
Need help programming a Streamzap remote?
Reply
#2
put that in the shell script used to launch xbmc. reactivate afterwards. problem solved. no code needed. no extra logic required to handle peeps not wanting it.

this is a solved problem looking for an overly complicated solution...
Reply
#3
@spiff - Good idea, but the command needs to be reissued on a regular basis or else xscreensaver will come on.

From the mplayer manpage:
Quote:−heartbeat−cmd
Command that is executed every 30 seconds during playback via system() - i.e. using the shell.
NOTE: MPlayer uses this command without any checking, it is your responsibility to ensure it does not cause security problems (e.g. make sure to use full paths if "." is in your path like on Windows). It also only works when playing video (i.e. not with −novideo but works with −vo null).
This can be "misused" to disable screensavers that do not support the proper X API (also see −stop−xscreensaver). If you think this is too complicated, ask the author of the screensaver program to support the proper X APIs.
EXAMPLE for xscreensaver: mplayer −heartbeat−cmd "xscreensaver−command −deactivate" file
EXAMPLE for GNOME screensaver: mplayer −heartbeat−cmd "gnome−screensaver−command −p" file

And from the xscreensaver man page:
Quote: -deactivate
This tells xscreensaver to pretend that there has just been user activity. This means that if the screen‐
saver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had
been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as
usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so,
issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
Need help programming a Streamzap remote?
Reply
#4
...your suggestion inspired me to write a script that does this. Still would be nice if the app did it naively in my opinion.

https://github.com/graysky2/xbmc_prevent_xscreensaver
Need help programming a Streamzap remote?
Reply
#5
while i understand where you are coming from... the problem is, then somebody wants something different on droid, something else on ios, we need the equivalent on windows and so on. if it can be done modularly outside code base, it should. simply to keep it manageable.
Reply
#6
I understand, spiff. I am happy to run the little shell script I whipped up, and will see about modifying the xbmc wiki for linux users to see it.
Need help programming a Streamzap remote?
Reply
#7
this was suposed to be fixed by http://trac.kodi.tv/ticket/5958 and http://trac.kodi.tv/ticket/4791

but it is not working in 14.1

any idea why ?
Reply
#8
You may also use this addon: https://sourceforge.net/projects/osscreensavermanager/ . It supports disablement of various Linux screen savers.
Reply

Logout Mark Read Team Forum Stats Members Help
disable xscreensaver when xbmc is running1