Anyone else out there using a bluetooth remote? How do you start XBMC?
#1
I'm using a Wii Remote for XBMC. I like the minimalist thing. A HTPC shouldn't need more than the navigation arrows and 3-4 other buttons.

I'm interested in hearing how other people are managing to start XBMC if using a bluetooth remote.

Our computer has no keyboard or mouse attached and XBMC starts up automatically when the machine starts. XBMC also shuts down after inactivity, and there's another script (managed by Myth TV) on the machine that will shut the machine down if it's not doing anything.

I have a modified the WiiRemote EventClient so it runs a script when the WiiRemote connects to the background EventClient process. That script checks to see if XBMC is already running, and if it isn't starts it.

Quite a lot of moving parts... has anyone done anything different that might be easier to implement?
Reply
#2
dteirney Wrote:I'm using a Wii Remote for XBMC. I like the minimalist thing. A HTPC shouldn't need more than the navigation arrows and 3-4 other buttons.

I'm interested in hearing how other people are managing to start XBMC if using a bluetooth remote.

Our computer has no keyboard or mouse attached and XBMC starts up automatically when the machine starts. XBMC also shuts down after inactivity, and there's another script (managed by Myth TV) on the machine that will shut the machine down if it's not doing anything.

I have a modified the WiiRemote EventClient so it runs a script when the WiiRemote connects to the background EventClient process. That script checks to see if XBMC is already running, and if it isn't starts it.

Quite a lot of moving parts... has anyone done anything different that might be easier to implement?

Hi Dave,

Once again it looks like I'm following in your footsteps here Smile

Would you mind sharing the changes you made to the WiiRemote EventClient and the script that you use?

Thanks,
Alex
Reply
#3
Sure, below is the patch:

Code:
Index: tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.cpp
===================================================================
--- tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.cpp    (revision 21195)
+++ tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.cpp    (working copy)
@@ -126,6 +126,8 @@
   wm = wiimotes[0];
   if (connected)
   {
+    // Run external script to start XBMC Media Center if it isn't already running.
+    system("xbmc-startup");
     EventClient.SendHELO("Wii Remote", ICON_PNG, NULL);
     wiiuse_set_leds(wm, WIIMOTE_LED_1);
     wiiuse_rumble(wm, 1);

And below is the script. It needs to be called "xbmc-startup", given execute permissions and stuck in the /usr/local/bin directory.

Code:
#!/bin/sh
if [ "`pidof -s xbmc.bin`" ]; then
        echo "XBMC Media Center is already running"
        exit 1
fi
DISPLAY=:0.0 xbmc -fs &

David
Reply
#4
Ta very much.

Interesting to see that the rotate functions are being handled too - I was playing with the idea of making them do something like ff / rw though that may turn out to be more of a pain than a benefit.
Reply

Logout Mark Read Team Forum Stats Members Help
Anyone else out there using a bluetooth remote? How do you start XBMC?0