VNC on the AppleTV | arfore dot com

Over Thanksgiving break I bought an Apple TV.  Like any good geek I wanted to expand the capability of the unit beyond the default setup.

After installing Firefox and getting USB keyboard and mouse support going, I realized that it would be tremendously cool if I could control it from my iPhone instead of using a wired keyboard.

To begin with I installed OSXvnc.  The only problem was that I needed to store a password.  After reading a the VNC post on the aTV Flash forum, I successfully conquered that.  However, I had the same problem that iMattUK had: you had to use an ssh connection to start it.

To conquer this I wrote a launchd plist to launch OSXvnc for me at system startup.  Read on for the process I used to get it all working.

Install OSXvnc

  1. Download Vine Server (OSXvnc).
  2. SFTP/FTP/SCP Vine Server.app to the Documents directory in /Users/frontrow/ on the Apple TV.
  3. SSH to the Apple TV and run the following commands:
    1. cd Documents
    2. cd Vine\ Server.app
    3. ./storepasswd YOURPASSWORD /Users/frontrow/vncpasswd
    4. cp Contents/Resources/OSXvnc-server /Users/frontrow/Applications

Setup Autostart

This next part is a little complicated if you haven’t done it before.  On OS X 10.4 Apple did away with the traditional Unix methods of starting daemons at system start.  The new method they implemented is called launchd.

What you need to do is to create a launchd plist to start the VNC server.  Since vi is not included on the Apple TV you will need to create this file on your computer and upload it.

Here’s the meaty content of my launchd plist:

Label com.arfore.VNC OnDemand RunAtLoad ProgramArguments /Users/frontrow/Applications/OSXvnc-server -protocol 3.3 -rendezvous Y -rfbauth /Users/frontrow/vncpasswd

%d bloggers like this: