[SOLVED] Abbility to trigger System.Logoff as Shutdown Option or as SCR feature

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
x23piracy Offline
Posts: 184
Joined: Feb 2011
Location: Germany
Post: #1

like explained here:

iam searching for a possibility to send the system to logoff the current user.
A shutdown option "logoff" is missing in xbmc settings.
Also i tried to manipulate the blank screensaver but all i could find is the addon.xml
without any code to add logoff to.

Can someone make a Screensaver that sends a system.logoff or is it possible
to add logoff as shutdown option?

The reason i need that is that aeon mq 4 produces a cpu load of 22% while idle in
the main menu, i dont want to shutdown the system because its the server 3x2tb.

If i enter any option menu the load falls to 5% in main menu 22% in logon screen (profiles)
it has just around 0,5% cpu load. So thats why i need that


Maybe someone can assist to change the default.py of this screensaver to trigger system.logoff
instead of the desired screensaver?

What needs to be changed to run system.logoff instead of launching the scr gui?

#Qlock screensaver add-on by phil65
#credits to donabi & amet

import sys
import xbmcaddon

__addon__    = xbmcaddon.Addon()
__addonid__  = __addon__.getAddonInfo('id')
__cwd__      = __addon__.getAddonInfo('path').decode("utf-8")
__resource__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib' ).encode("utf-8") ).decode("utf-8")


if __name__ == '__main__':
    import gui
    screensaver_gui = gui.Screensaver('script-python-qlock.xml', __cwd__, 'default')
    del screensaver_gui

Greetz X23
(This post was last modified: 2013-09-23 22:16 by x23piracy.)
find quote
x23piracy Offline
Posts: 184
Joined: Feb 2011
Location: Germany
Post: #2


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.logoff" name="logoff" version="0.0.1" provider-name="x23piracy">
    <import addon="xbmc.python" version="2.1.0"/>
  <extension point="xbmc.service" library="default.py" start="login"></extension>
  <extension point="xbmc.addon.metadata">
    <summary>Logoff while screensaver is active add-on by x23piracy</summary>
    <description>Logoff while screensaver is active.</description>


import xbmc

class MyMonitor(xbmc.Monitor):
    def __init__(self):

    def onScreensaverActivated(self):

monitor = MyMonitor()

while not xbmc.abortRequested:

Thanks to seo!

Greetz X23
(This post was last modified: 2013-09-22 19:24 by x23piracy.)
find quote
djmattcorzine Offline
Junior Member
Posts: 1
Joined: Mar 2014
Reputation: 0
Post: #3
At first glance this works well. After a few days of playing I notice a few things.
1. When the screensaver logoff event occurs, the screen goes black. Not a huge issue, just unexpected.
2. When using this with my non-master profile: the screensaver logoff occurs, the screen goes black, then to wake the screen I must press enter. No other key restores XBMC although XBMC does play the key navigation sounds.
3. For some strange reason (only once in a while), after a screensaver logoff event, XBMC seems to run slow. Restarting XBMC resolves the issue.
4. Another strange occurrence was that sometimes the screen would dim, as if using the dimming screen saver except while I was navigating the XBMC menus.

My setup is as follows.
XBMC is loaded onto a Win 7 Pro desktop. All sleep, hibernation, and power saving features are turned off. Only 1 Windows admin account is used. There are 2 XBMC profiles, a master with text passcode and a user with no passcode. The user profile has a lock on the settings menu. I use the 1Channel/Primewire addon with favorites, subscriptions, and syncing multiple installs using a MySQL database. I am using the default Confluence skin with no modifications.

I like the simplicity of adding this feature and the convenience of having auto logoff, but this is not usable for my wife and daughter. Any suggestions are appreciated.
find quote
elmerohueso Offline
Posts: 306
Joined: Jul 2011
Reputation: 5
Post: #4
I put this together today if you're interested.
find quote