[MAC] Force XBMC to always be open / running
#1
Thumbs Up 
i am in the process of migrating my MythTV HTPC to a mac mini running XBMC. all my video/music/picture libraries have been setup nicely, but i ran into one small problem: i share a house with a lot of people and i know some of them are going to attempt to use this as a terminal to the Internet (which i would like to avoid). my solution was to write a small apple script that looped looking to see if the XBMC process was closed, if so, it reopens it. the following is how i accomplished this:

Code:
repeat
  tell application "System Events" to set xbmc to (name of processes) contains "XBMC"
    
  # open XBMC if closed
  if xbmc = false then
    tell application "XBMC" to activate
  end if
    
  # force XBMC to be the app in focus
  tell application "XBMC" to activate
    
  delay 15
end repeat

to setup: simply save the above script as an application (i saved it in /Applications/) then make it a startup item for the respective user profile.


*note: i fully realize that any user with above moderate knowledge of computers could get around this, but those aren't the users im trying to keep off other processes on this htpc.

hope this is useful to someone else out there Smile
Reply
#2
You need to bust a cap in your housemates rear. It's your computer, take control of it, enable the OSX screensaver and enable password login.

There's nothing the devs can do to solve this problem.
Reply
#3
davilla Wrote:You need to bust a cap in your housemates rear. It's your computer, take control of it, enable the OSX screensaver and enable password login.
another option sure, but doesn't really accomplish what i want.

davilla Wrote:There's nothing the devs can do to solve this problem.
agreed. i am not looking for any feature in XBMC to help me here, just thought i would be proactive about enforcing it to stay open.


for the record, XBMC's feature-set perfectly suites my needs and i am completely satisfied with my environment Smile
Reply
#4
see http://developer.apple.com/technotes/tn2002/tn2062.html

the section on Replacing the Finder

This is what Launcher 2.3 does under the AppleTV to boot into multifinder.

The command would be;

Quote:sudo defaults write com.apple.loginwindow Finder /Applications/XBMC.app

Once you do this, xbmc will be in front forever.

Extreme caution is recommended and you better have ssh enabled so you can ssh in and reverse this change if needed. The command would be;

Quote:sudo defaults delete /Library/Preferences/com.apple.loginwindow Finder
Reply
#5
^ brilliant! thnx dude Smile
Reply
#6
davilla Wrote:see http://developer.apple.com/technotes/tn2002/tn2062.html

the section on Replacing the Finder

Great tip, it is a shame that the links in the article on Apples site are dead, but Google has plenty to offer
Reply

Logout Mark Read Team Forum Stats Members Help
[MAC] Force XBMC to always be open / running1