I'm running XBMC on Arch Linux. I would like to bind a key to trigger the monitor to turn off. I have a remote with a power button, and I would like that to cause the display to go to sleep, just like when there hasn't been nay activity in a while.

I tried doing

        <power>System.ExecWait("xset dpms force off")</power>

This just causes the screen to go black (but not off) and display a X cursor. When I used Exec instead of ExecWait, it actually caused XBMC to stop being fullscreen, which was odd.


I was trying to do the same thing. Here is what I found worked for me.

Create a script called xbmcdisplayoff.sh or something similar. In the script:

sleep 0.5
xset dpms force off &

Then save it and make it executable. Now, if you just launch that with either Exec or ExecWait it should work. However, both these put XBMC in windowed mode and it doesn't return to fullscreen when you wake the display.

So in XBMC you need to install the "Advanced Launcher" add-on (it's in Program Add-ons). Now open up Advanced Launcher. Press "C" to get the context menu and select "Create New Launcher". Choose "Standalone". Find the xbmcdisplayoff.sh script and select it. Next screen asks for application arguments so just clear the "%rom%" and hit enter. Then give it an appropriate title like "Turn Off Display" and hit enter again. Then choose "Linux" for the platform.

Almost done. In the Advanced Launcher window highlight our new "Turn Off Display" entry and hit "C" for the context menu. Go "Edit Launcher", then "Advanced Modifications". Turn "Toggle XBMC Fullscreen" off. Now put it in your favourites by pressing "C" again and selecting "Add to Favourites". Now test it by going into your favourites and selecting it. Hopefully it should work properly.

This post on the xbmc forums tells you how to assign a favourite to the keymap: http://forum.xbmc.org/showthread.php?tid=85724&pid=1136974#pid1136974

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.