[MAC] Force XBMC to always be open / running

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bello Offline
Junior Member
Posts: 20
Joined: Mar 2009
Reputation: 0
Location: Vancouver
Thumbs Up  [MAC] Force XBMC to always be open / running
Post: #1
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
(This post was last modified: 2009-03-17 22:24 by bello.)
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,479
Joined: Feb 2008
Reputation: 64
Post: #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.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
bello Offline
Junior Member
Posts: 20
Joined: Mar 2009
Reputation: 0
Location: Vancouver
Post: #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
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,479
Joined: Feb 2008
Reputation: 64
Post: #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


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
bello Offline
Junior Member
Posts: 20
Joined: Mar 2009
Reputation: 0
Location: Vancouver
Post: #5
^ brilliant! thnx dude Smile
find quote
drivesoslow Offline
Fan
Posts: 467
Joined: Aug 2008
Reputation: 4
Post: #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
find quote