Lock command?
#1
I have a master password set on my xbmc so a password prompt comes up when it starts up. I want to create a script to lock xbmc after x number of minutes and present the login screen, but I haven't found the command to perform the lock. Help please.
Reply
#2
executebuiltin(masterlock). it's a toggle though, you can check the current status using the system.ismaster infobool. you can logout using executebuiltin(system.logout).

also see DialogButtonMenu.xml in the pm3 skin for reference
Reply
#3
You can lock the screen saver AFAIK. Just set the screensaver time out to w/e you want.
Reply
#4
yes, you can also use the screensaver lock if that does the job...
Reply
#5
I'm creating a usage timer for my kid so she knows when to take a break from tv. So the screen saver lock won't work.

Ran the following without error but it also didn't do anything:

Code:
import xbmc, xbmcgui
xbmc.executebuiltin('masterlock')

or

Code:
import xbmc, xbmcgui
xbmc.executebuiltin('xbmc.masterlock')

Checking DialogButtonMenu.xml, the logoff command is: system.logoff. Tried xbmc.executebuiltin('system.logoff') but it didn't do anything either.

Went to Settings and enabled Login Screen. Now xbmc.executebuiltin('system.logoff') will bring me to the login screen so I can select a user and enter a password.

Still, I only want to lock the screen and not log off. Since I only have one user, I rather not have the extra step of selecting a user before entering a password. Am I missing something with the masterlock command?

Thanks!
Reply
#6
the two commands you're looking for are:
Code:
xbmc.getCondVisibility('System.IsMaster')
xbmc.executebuiltin('Mastermode')
slightly offtopic:
System.GetBool(System.IsMaster) doesn't work.
is this a bug or am I missing something?
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply

Logout Mark Read Team Forum Stats Members Help
Lock command?0