Launch XBMC on startup plus keep focus
#1
Is there some way to setup xbmc directly or via a thirdparty software (program or applescript or whatever) so that xbmc launches at startup when my mac mini boots up onto the desktop, and then once loaded to keep focus of the app?

I use a mac mini only as an xbmc media centre. there is NOTHING else install other than vnc. I have a similar setup with a windows 7 net top pc, and i got this program called xbmclaunched that does exactly this, i.e. launch on startup, and then make sure xbmc stays in focus if some other window pops up, takes away focus or xbmc minimizes.

WIth my mac mini though even though i added xbmc to login items, most of the time xbmc either launches minimized (not in focus), or launches but then a few seconds later loses focus because of some other startup processes. and that means having a mouse handy constantly just for this one task. Or vnc'ing. which is not very family friend.

So i'm sure all my other mac diehards have figured out a solution. i just cant find anythign via google or these forums directly. i cant be the only one that has this issue.
Reply
#2
A suggested fix seems to be to edit the advancedsettings.xml file as per the instruction in this topic (effectively disabling the fakefullscreen mode):
http://forum.xbmc.org/showthread.php?tid=97960

However, this fix results in a black screen when starting XBMC, only possibility is to exit XBMC with the CMD + Q shortcut. At leas that is the result for me, and for someone in the topic above. I'm also running a mid '11 mac mini, so that might be an issue.

I wonder if anyone else has gotten it to work correctly. Not only is it a problem when booting, but it's also very frustrating when for example Software Update shows a pop up..
Reply
#3
I had a similar problem when starting XBMC from inside FrontRow. I ended up using a 2 part solution. First get the super_hide script from here (it's the longer script at the bottom of the first post). put it in /usr/local/bin and make it executable per the instructions in the post. Then either create or append the autoexec.py file in your userdata folder. Mine looks like this:

Code:
import xbmc
import os
import xbmc

xbmc.executebuiltin('RunScript(script.hululibraryautoupdate)')

os.system("/usr/local/bin/super_hide -v XBMC")

I already had this file with the hululibraryautoupdate script line. So I just added the line:
Code:
os.system("/usr/local/bin/super_hide -v XBMC")
at the end. If you create a new file be sure to add the first two import commands as well. I'm pretty sure the third one is redundent, but it was there when I appended the file, so I left it.
Reply
#4
What you are requiring should be quite easy using applescript:

Code:
tell application "XBMC"
        activate
        enter full screen
        tell application "Finder"
            set visible of process "XBMC" to true
        end tell
end tell
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#5
so what you're suggesting is to create an applescript with the code below, put it in my login items, and it will launch xbmc automatically, put it in focus, and then ensure that xbmc ALWAYS stays in focus and anything that pops up (apple updates, mounting samba drives, etc) doesnt come into focus?

also i have another login applescript that mounts my samba drives. this wont effect that will it?

(2013-05-21, 05:26)activate Wrote: What you are requiring should be quite easy using applescript:

Code:
tell application "XBMC"
        activate
        enter full screen
        tell application "Finder"
            set visible of process "XBMC" to true
        end tell
end tell
Reply
#6
No, but it should accommodate most scenarios. Are you always rebooting the mac ?
I have more than a handful of applications continuously running and nothing gets on top of it other than growl which I want. Software updates can be turned off so can notification center. It is also upto you to address the offending app's settings to ensure it stays in the background. The script I quoted is the xbmc launch script mapped to my remote so that, even if something was to get on top of it and xbmc was to loose focus, just one click on the remote brings it back.

Otherwise, technically the fakefullscreen mode is the answer, with or without its issues.
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#7
Hello,

Maybe I'm missing the point here, but, you can define on login items programs that you want to start when logging in. And since the release of mac os x lion the system remembers which applications were open when the user asks the system to shutdown. I'm wrong?
Reply
#8
(2013-05-22, 19:12)LordAnubis3 Wrote: Hello,

Maybe I'm missing the point here, but, you can define on login items programs that you want to start when logging in. And since the release of mac os x lion the system remembers which applications were open when the user asks the system to shutdown. I'm wrong?
Yes, you can but in reality, it doesnt run accurately enough to predict a screen free outcome. You need to dig into each login app and ensure that its settings are such that, they open and stay in the background and items like check for updates are off.
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#9
Hi, took me a while to finally get to my xbmc machine. was travelling for a while.
put your script in applescript,
but when i run it it says

"Syntax error. expected end opf line. etc. but found application constant or consideration"

I press ok, and the "full" in the line "enter full screen" is highlighted.

If i remove that enter full screen line, it launches xbmc, but immediately on launch the dock is infront of it. if i have a finder window open the xbm window is behind the finder window too.



(2013-05-23, 02:25)activate Wrote:
(2013-05-22, 19:12)LordAnubis3 Wrote: Hello,

Maybe I'm missing the point here, but, you can define on login items programs that you want to start when logging in. And since the release of mac os x lion the system remembers which applications were open when the user asks the system to shutdown. I'm wrong?
Yes, you can but in reality, it doesnt run accurately enough to predict a screen free outcome. You need to dig into each login app and ensure that its settings are such that, they open and stay in the background and items like check for updates are off.
Reply
#10
That script seems to be an old trial one. Sorry. Try this one:

Code:
tell application "XBMC"
    activate
    reopen
end tell
tell application "System Events" to set frontmost of process "XBMC" to true
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply

Logout Mark Read Team Forum Stats Members Help
Launch XBMC on startup plus keep focus0