So here it is. The proof of concept Finder Hiding widget. So why did I bother? What’s the big idea? It goes basically like this: Apple TV (and, presumably the upcoming iPhone) can run many Intel Mac OS X applications because Apple TV is, essentially, an OS X computer that runs a slight variant on the OS. However, Finder wants to take over and control the way users interact with the unit. It refuses to hide, it refuses to hand over control to another app.
More after the jump…
Sure, you can ssh your way in and replace Finder.app with another application or use other low down dirty tricks to get Finder to behave by, essentially, breaking it but my goal was to expand the way people could interact with Finder without replacing it or breaking the system. In other words, I wanted to prove that you could write a plug-in that adds itself to Finder and allows you to call and execute another application, handing over interactive control to that application until you quit and returned to the Apple TV interface.
The first step to this was my Perl plug-in. It allows you to run arbitrary perl code and returns a simple alert screen showing the output of that program. But the program runs in the background. I wanted to push things further. Sure, I could make VLC start playing back a movie but it played behind Finder. You could hear it but not see it and you could not interact with it.
So where are things now? The Hider plug-in tells Finder to close and hide its windows and it stops the screen saver from starting up. The application you run (it’s compiled in right now, and it’s VLC–which must be ported over by hand to Apple TV) can now be seen and used. Finder, using NSTask, waits until the subprocess terminates, and then returns. It’s still really crude–I’d much prefer bringing back the finder by pressing Menu, and having the child task pause until re-selected, and I should store the previous screenSaverTimeout instead of just assigning 20 seconds by fiat, but say it with me: “Proof of Concept”, not deliverable product.
If you want to give the Hider appliance a spin, you can download a copy here: Download file. Use at your own risk and please do not sue.
- (id)applianceControllerWithScene:(id)scene {
NSTask *myTask = [[NSTask alloc] init];
[myTask setLaunchPath:@"/Applications/VLC.app/Contents/MacOS/VLC"];
[[NSNotificationCenter defaultCenter] postNotificationName: @"BRDisplayManagerStopRenderingNotification" object: [BRDisplayManager sharedInstance]];
[[BRSettingsFacade settingsFacade] setScreenSaverTimeout:0];
[[BRDisplayManager sharedInstance] releaseAllDisplays];
[myTask launch];
[myTask waitUntilExit];
[[BRDisplayManager sharedInstance] captureAllDisplays];
[[BRSettingsFacade settingsFacade] setScreenSaverTimeout:20];
[[NSNotificationCenter defaultCenter] postNotificationName: @"BRDisplayManagerResumeRenderingNotification" object: [BRDisplayManager sharedInstance]];
[scene renderScene];
return self;
}


"variant" is misspelled above.
Also, what do you mean "More after the jump..." That sentence makes no sense in any context.
Grace, thanks for the spelling catch. As for "More after the jump" it refers to the Mac blog here at O'Reilly. Only the first paragraph appears and you must click to jump to the entire article. I'm guessing that perhaps you read this over an RSS feed. Best regards.
Erica... I'm a bit stuck with this one. I couldn't get it to show up in the ATV interface after installing in the normal manner. I have the quit.frappliance plugin also installed - is there only room for one plugin, or can I have both at the same time? Any other suggestions?
OK, got it working! Now how do I return to the ATV interface after using this?
Erica,
Have you looked at iRed Lite? http://www.filewell.com/iRedLite/
How about this approach
1. A plugin launches iRed Lite and hides the Finder
2. Have configs in iRed Lite launch other apps and control them
3. when you are done you run an app from iRed Lite that starts the Finder again
Unfortunately the last time I did NextStep programming was in 1992, and have forgotten it all. And I just built a Hackint0sh over the weekend to get into it again. All the macs I own are PPC.
Erica,
I took both your ideas, running any perl script and this and made a new plugin that will let you run any app if you add it to a config file. I have posted it here http://forum.insanelymac.com/index.php?showtopic=47087&st=0&gopid=354014entry354014.
This technique is a pain though because debugging is very difficult, I usually vnc into atv. but this somehow runs apps on a layer that vnc can't see.
Thanks for the great ideas and tutorials.
Here's something I've noticed while playing with the ATV that may help. If you remove the ripstop.plist and unload the watchdog.kext, you can then run any application without the Finder getting in the way - as long as you first open the desired application, then kill the Finder. When you quit your application, the Finder restarts automatically. Since discovering this, I haven't had to replace my Finder.app.
Anyway, it's a bit moot now with your new frappliance. Thank you so much.
Why does it hides Finder not every time? Sometimes everything is ok (I running VLC from my frapp) with the code above, but sometimes Finder just fades out and next momentary fades in, capturing the whole display and looping in [myTask waitUntilExit]! I have sound from VLC, but no video
Any ideas? Thank you!