Applications Menu

From AwkwardTV

Jump to: navigation, search

<Google>WIKI</Google>

Applications Menu Appliance
Current Version: 1.1.5
Download Location: awkwardTV Plugin page
Release Date: June 22, 2007

This appliance is Copyright © 2007 AK2007 of awkwardTV. All Rights Reserved.

Contents

Introduction

This appliance will enable you to execute any application that that can run on an Intel based Mac. Please note that AppleTV has a stripped down version of OSX and may not be able to run all applications. The Plugin reads the list of the applications and their options from a configuration file (see the section below) and presents them to the users as menu options. The latest version of the plugin automatically detects if you have a running VLC and provides the ability to control VLC using the remote.

--- This Plugin has been updated to run with AppleTV Update 1.1 ---

Working Software

- Firefox

- MythTV

- iGrabNews

V1.1.x Features

These values can be specified in the configuration file to activate additional functionality

  • fireandforget - Run applications in background
  • killfinder - Stop ATV UI before launching the child application
  • remotehelper - Press and Hold to exit the launched application and VLC controls
  • [-browseforfile-] - use this in the args parameter to browse for a file on ATV
  • Automatically detect VLC in remotehelper mode and control it with the Apple Remote
  • Now files name in app names are now supported, however spaces are not supported for files and paths in the arguments list

VLC Settings

The plugin recoginzes if you launch VLC in the remotewatcher mode and allows you to control VLC using the remote. VLC support is provided using the VLC AppleScript interface. There are some limitations in VLC's Applescript interface mainly that it does not support Fast Forward, Rewind or any skipping in the file. But it is great for watching live streams using playlists.

These settings have been used successfully with VLC. With these setting you will be able to browse for a file and that file or a playlist, and the file wold be passed to VLC.

 <dict>
   <key>args</key>
   <string>-f --video-on-top [-browseforfile-]</string>
   <key>fireandforget</key>
   <false/>
   <key>killfinder</key>
   <true/>
   <key>menu</key>
   <string>VLC</string>
   <key>path</key>
   <string>/Applications/VLC.app/Contents/MacOS/VLC</string>
   <key>remotewatcher</key>
   <true/>
   <key>browsepath</key>
   <string>~/</string>
 </dict>

These settings use killfinder mode, Watchdog must be disabled for this mode so that AppleTV doesn't get in reboot loop.

Follow the steps in 'Method Two: Manually Disable Ripstop and Watchdog' on the Watchdog page.

The following VLC functions are supported by the remote

  • 1. Play
  • 2. Pause
  • 3. Vol Up
  • 4. Vol Dn
  • 5. Next item on play list hold right button
  • 6. Previous item on play list
  • 7. Close VLC and quit - press and hold menu button

Usage Notes

1. Sometimes the AppleTV UI refuses to give up the screen and the launched app runs behind the ATV UI and is not visible. Usually this happens after rebooting AppleTV and occasionally after the screen saver has kicked in. One workaround is to close the Apple TV UI, this will automatically restart so don't worry. Doing this 2-3 times after the reboot usually makes things behave.

2. Spaces in file names or paths passed in the args list are not allowed, this also hold true for files browed using the -browseforfile-] parameter.

3. If you use the killfinder option depending on how your hack has been done Watchdog may kick in and start rebooting your machine. The plugin will try to stop the Watchdog but its has only been tested on a couple of machines. I normally have Watchdog disabled on my machine, and have a very stable environment. I have used the Method Two: Manually Disable Ripstop and Watchdog- method from the Watchdog page.

Take 2 Compatability

Currently it does not work with Take2 update. If I may add my own feature request for Take 2: Left menu item would be Applications, right menu items would be the applications registered in the plist (preferably in the order of the plist? see above). - Maraklov 22:02, 23 February 2008 (CET)

  • AK2007 is looking for someone to take over the project. See Here
  • AK2007 -> Applications menu functionality will incorporated in the next version of nitoTV
  • iScripts has this functionality for Take 2

Credits

This plugin was developed by AK2007 of AwkwardTV.

Images were created by BigBaconAndEggs of AwkwardTV. Many thanks to Alan Quatermain of AwkwardTV for the wonderful tutorials and a robust debugging environment, and |bile| of AwkwardTV for their assistance in solving several techincal issues. Special thanks to Eric III of Awkward TV and Erica Sadun for the sample code.

Revision History

Version 1.0 (29th May 2007):

  • Initial version that suspended BackRow and launched an application.

Version 1.1 (not released publicly):

  • Added support to kill the Finder.app and run apps
  • Added support to close applications that do not support the remote control
  • Changed the format of the configuration file
  • Added menus to close Finder and reboot AppleTV
  • Added support for launching background applications
  • Added support for passing arguments

Version 1.1.2 (1 June 2007):

  • Allow Filname substitions in the arguments list allow users to browse for target files
  • Support for VLC using the Apple Remote

Version 1.1.3 (1 June 2007):

  • Added FRAppliancePreferedOrderValue for the plugin

Version 1.1.4 (1 June 2007):

  • Uses [BRAppManager terminate] instead of NSApplication terminate

Version 1.1.5 (22 June 2007):

  • Compatible with ATV 1.1 and 1.0
  • Runs background tasks with nice -s20
  • Fixed bug when the screesaver bug

Future Plans

Version 1.2:

  • Allow adding and removing items from the AppleTV UI
  • Allow changing options from AppleTV UI

Configuration File

V 1.0

File Location and Name \Users\frontrow\Applist.txt The configuration file contains the list of applications one per line. The format is Menu Label,path/to/your/app

Please Note : You have to find the actual executable usually located in Contents\MacOS directory.

V 1.1

File Name and Location: /Users/frontrow/Documents/Applist.plist

Sample Configuration File:

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
   <key>Applications</key>
   <dict>
     <key>0</key>
     <dict>
       <key>args</key>
       <string></string>
       <key>remotewatcher</key>
       <false/>
       <key>fireandforget</key>
       <false/>
       <key>menu</key>
       <string>AppleRemote</string>
       <key>killfinder</key>
       <true/>
       <key>path</key>
       <string>/Users/frontrow/Applications/AppleRemote.app/Contents/MacOS/AppleRemote</string>
     </dict>
     <key>1</key>
     <dict>
       <key>args</key>
       <string>-f --video-on-top /Users/frontrow/aaj2.asx</string>
       <key>remotewatcher</key>
       <true/>
       <key>fireandforget</key>
       <false/>
       <key>menu</key>
       <string>VLCTest</string>
       <key>killfinder</key>
       <true/>
       <key>path</key>
       <string>/Applications/VLC.app/Contents/MacOS/VLC</string>
     </dict>
   </dict>
 </dict>
 </plist>

Detailed Description

Each application should have a unique keys the keys should be sequential with no gaps and start at 0 followed by the entries for that application.

 <key>0</key>
 <dict>

Label for the Menu on the screen This is a string type value and should not be blank

 <key>menu</key>
 <string>AppleRemote</string>

The path key should contain the fully qualified path the actual executable being launched. Please not that mac apps have a .app exetension this is actually the name of a folder and you must put the actual file name which is usually in xxx.app/Contents/MacOS director. This is a string value and must not be blank.

 <key>path</key>
 <string>/Users/frontrow/Applications/AppleRemote.app/Contents/MacOS/AppleRemote</string>

Arguments to the launched appliction are passed in the args key. This is string type value and can be blank.

 <key>args</key>                                           
 <string>-f /Users/frontrow/</string> 

You can also use [-browseforfile-] macro in the argument list as a placeholder for a file. If [-browseforfile-] is present in the argument list, the plugin allows you to browse for a file. For example the following, if used for mplayer will allow you to choose a playlist file and launch mplayer it in full screen mode. This macro can be use with the browsepath option to set the start location, by default it is /Users/frontrow

 <key>args</key>                                           
 <string>-fs --playlist  [-browseforfile-]</string> 

The killfinder option is used to kill the AppleTV Finder application, this mode is useful for applications that seem to consistenly launch behind the BackRow screen, or have problems with screensavers. One possible side-effect of using this mode can be that the Watchdog process can kick in and reboot ATV in recovery mode. Watchdog must be disabled for this mode so that AppleTV doesn't get in reboot loop.

Follow the steps in Method Two: Manually Disable Ripstop and Watchdog- method on the Watchdog page.

The possible values for this key are </true> and </false>

 <key>killfinder</key>
 <true/>

The remotewatcher option actives a helper application which listens to the remote control and is used to exit applications which do not support the remote. To exit an application press and hold the remote key. The possible values for this key are </true> and </false>

 <key>remotewatcher</key>
 <false/>

The fireandforget mode is used to lauch background processes, this is meant to be used for non-gui processes. The screen is not yielded to the background process in this mode. If this mode is used killfinder and remote watcher options are ignored. The possible values for this key are </true> and </false>

 <key>fireandforget</key>
 <false/>

The browsepath mode is used in conjunction with file subsitition feature. If this value is present it will be used as the starting point for browing for files This is a string value and should point to a valid path in the system

 <key> browsepath </key>
 <string>/Users/frontrow/Movies</string>

Legal Information

Copyright © 2007 AK2007 of awkwardTV. All Rights Reserved.

Icons by BigBaconAndEggs of AwkwardTV.

AppleTV is a registered trademark of Apple, Inc. AppleTV and BackRow are Copyright © 2006-2007 Apple, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, publish, and/or distribute copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The author is in no way affiliated with Apple, Inc.

Personal tools