Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

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.

share|improve this question

1 Answer 1

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:

#!/bin/bash
sleep 0.5
xset dpms force off &
exit

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

share|improve this answer
    
Script doesn't work for me. Using Sleep Display instead. –  Cawas May 30 '13 at 5:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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