Kodi Community Forum

Full Version: XMBC launches underneath Mythfrontend [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So this might be a stupid question and I'm hoping it has a simple answer. Google has not been my friend on this one. So I have installed XBMC on my Myth Box (Ubuntu 14.04) and it was working fine until an update a couple of weeks ago. Now when I launch XBMC from mythfrontend, XBMC launches but it is underneath mythfrontend. The focus of the keyboard, is actually on XBMC, so I first thought it had locked up, but if I alt-tab to XBMC, everything is fine. Previously, when I launched XBMC from mythfrontend, XBMC was in the foreground. Needless to say WAF has gone way down on this one. Any ideas on how to fix this?

Any and all suggestions are appreciated.

DoTheDog
What is the menu command you are using to start xbmc?
nickr,
Thanks for the response. I have this in my ~/.mythtv/library.xml

<button>
<type>XBMC</type>
<text>XBMC</text>
<description>Launch XBMC</description>
<action>EXEC /usr/bin/xbmc</action>
</button>

it worked fine until a couple of weeks ago.

Any help is appreciated.

Myth Version: 0.27.3-5
Ubuntu version: 13.10
XBMC Version: 13.1

Thanks,
DoTheDog
I just updated my mythbuntu system to see if this happened to me and it didn't, but I haven't rebooted yet!
Yeah, I'm not positive that an update did it, just seems like it happened after one. Any ideas on how to fix it?

EDIT: just rebooted and no change...
Yeah but to be on 0.27.3 you must have updated reasonably recently...

Focus issue, hard to work out without the machine right there. The window manager is responsible for moving windows about. My difference is that I am running precise and mythbuntu as opposed to trusty and ubuntu.

Does xbmc log mention anything?

If you quit mythfrontend and then run xbmc then run mythfrontend what happens (probably the easiest way to start things is over ssh).
nickr,
Thanks for hanging with me on this. Looking through the log, nothing looks too strange. I can attach if you think it will help. I tried shutting down mythfrontend, starting xbmc with /usr/bin/xbmc and it starts fine. If I then start mythfrontend, it shows up on top of xbmc. Eg I see mythfrontend not xbmc. Make sense?

Let me know if there is anything else I can try.

Thanks,
DoTheDog
DISPLAY=:0 wmctrl -a "XBMC Media Center"

Will bring xbmc to focus. But with launching external applications I find it a lot more reliable to write a script to kill xbmc, run program, then restart xbmc (or vice versa). Saves so much trouble.
teeedubb,
Thanks for the response. But where do I put that line? in the menu ACTION line?

DoTheDog
Probably best to make a script and use that instead of the xbmc path, eg
myth-xbmc-launch.sh
Code:
#!/bin/bash
xbmc &
sleep 3
DISPLAY=:0 wmctrl -a "XBMC Media Center"

That's a pretty simple example, you could add some checks to make sure xbmc is running (eg it could take more than 3 seconds to start) and only run the focus command after xbmc is started, but I'm not masochistic enough to do that from my phone Smile
teeedubb I knew there would be come commandline way of doing this, but I am glad you posted the answer and saved me hours of searching.
teeedubb,
Thank you. I will mark this solved, but I'm not sure why. After an Ubuntu update, XBMC now launches on top of mythfrontend. weird. I didn't do anything...

Although thanks for the script. If this happens again I will definitely be searching for this.

nickr. thank you too.

DoTheDog