First step was getting the MythFrontend to work on my mac… I downloaded the newest version, ran it, gave it the configurations needed, and it would repeatedly silently die. After trying to get a 0.21 build to work, I finally figured out how to run an application from the command line (no error messages! Argh!) and was able to see that there was a version mismatch. Downloaded 0.20-fixes and it worked great, first time. Three hours gone… sigh.
Moving on to the AppleTV…
Used the original appletv install documentation on the mythtv site
It went pretty well, directing me to an engadget article about upgrading appletv hard drives, showing how to dissasemble the appletv and back up the contents of the hd.
dd if=/dev/disk1 of=/Users/mps/AppleTV.img bs=1024k
to check status, new terminal window and “kill -INFO [8636, PID of the dd process]”
then moving over various files:
cp -p /Users/mps/Downloads/Patchstick/Patchstick/atvloader/AwkwardTV.frappliance/Contents/Resources/sshd /Volumes/OSBoot/usr/sbin/ chmod +x /Volumes/OSBoot/usr/sbin/sshd cp -p /Users/mps/Downloads/Patchstick/Patchstick/ssh/ssh.plist /Volumes/OSBoot/System/Library/LaunchDaemons/ defaults delete /Volumes/OSBoot/System/Library/LaunchDaemons/ssh Disabled mkdir /Volumes/OSBoot/System/Library/Frameworks/OSXFrames cp -pr /System/Library/Frameworks/Kerberos.framework /Volumes/OSBoot/System/Library/Frameworks/OSXFrames/. cd /Volumes/OSBoot/usr/libexec/ cp /usr/bin/ssh* ../../usr/bin/ cp /usr/libexec/sshd-keygen-wrapper ../../usr/libexec/ cp /usr/libexec/sftp-server ../../usr/libexec/
when I tried to “cp /usr/libexec/ssh* ../../usr/libexec/” I got:
“cp: /usr/libexec/ssh-keysign: Permission denied”
so somehow there was a strange source permission issue… I didn’t sudo it because the docs said it wasn’t really needed.
then fixing perms:
sudo chown 0:0 sshd-keygen-wrapper chmod 755 sshd-keygen-wrapper sudo chown 0:0 sftp-server chmod 755 sftp-server cd ../../usr/bin/ sudo chown 0:0 ssh* chmod 755 ssh*
and then it says we’re done and to test ssh. However, I don’t want to be transferring 100mb of MythFrontEnd over wireless if I don’t have to… so:
tar cf ~/MythFE.tar -C /Applications/ MythFrontend.app
(yes, there’s a space before the MythFrontend.app, and I don’t know why… I’ll read the tar man page someday) [edited: read the man page, it's to change to that directory before running the tar command. Handy.]
cp MythFE.tar /Volumes/OSBoot/
(might be lost, but then again might save me time later)
So then comes the test… connecting with SSH:
$ ssh -1 frontrow@appletv.local Protocol major versions differ: 1 vs. 2 $ ssh frontrow@appletv.local Unable to negotiate a key exchange method
so, according to another page on the site this is because the ’sed’ that I used on sshd-keygen-wrapper was missing a space. However, the drive is back in the appletv so grrrrr.
Next step: build a patchstick. Gathered everything, ran the Leopard script and it says happy.
No boot. Rats. Since I had to use a USB-SD adapter instead of a regular USB stick, maybe it’s not bootable.
Borrowed a 512mb stick from a friend and re-created the patchstick. It works! OK, so I can now SSH into the appleTV. Next step, being able to do anything
Following the instructions, I went to make the disk read-write:
mount -o remount,rw /dev/disk0s3 / /dev/disk0s3 on /: Operation not permitted
No dice. From the awkwardTV description:
The user "frontrow" has complete sudo privileges. To be root, do sudo -s and put in the password again
which says to me that the original guide is probably out of date. As if we hadn’t already discovered that. So, I’m going to take the rest of the steps with a grain of salt…
root@appletv# mkdir /etc/mach_init.disabled root@appletv# mv /etc/mach_init.d/ripstop.plist /etc/mach_init.disabled
Add the following to /etc/rc.local (create this file if it doesn’t already exist):
/sbin/kextunload -b com.apple.driver.AppleTCOWatchdog
Well, the read-write instructions worked OK, but vim and su didn’t — looks like Leopard strikes again. That means the well-intentioned line about adding to rc.local didn’t work easily since there’s no editor, and now I have to find vi somewhere else so it will work. Instead I went with the lazy method described on the watchdog detail page:
echo "/sbin/kextunload -b com.apple.driver.AppleTCOWatchdog" >> /etc/rc.local
which worked. Huzzah for Echo. Timezone time…
echo "/bin/ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime" >> /etc/rc.local
Erg. Big stopsign as my ATV is now rebooting after a few minutes. Not the 58 seconds described in the Watchdog writeup, maybe ATV2 is different… reverting…
-bash-2.05b$ sudo mv /etc/rc.local . Password: -bash-2.05b$ ls Desktop Library Music Pictures Sites Documents Movies MythFE.tar Public rc.local -bash-2.05b$ ls /etc/mach_init.disabled/ ripstop.plist -bash-2.05b$ sudo -s bash-2.05b# mv /etc/mach_init.disabled/ripstop.plist /etc/mach_init.d/
so the ripstop.plist is back in place and rc.local is hidden. Waiting now to see if that stops the rebooting. It did.
OK, so moving to install nitoTV (after downloading it to my local downloads, and since there’s no unzip on the ATV) since it claims to kill the watchdog in 2.1:
mac$ tar cvf ~/nitoTV.tar -C /Users/mps/Downloads/ nitoTV.frappliance mac$ scp nitoTV.tar frontrow@appletv.local:~
atv$ sudo -s atv# tar xvf nitoTV.tar atv# mv nitoTV.frappliance/ /System/Library/CoreServices/Finder.app/Contents/PlugIns atv# ps -ax | grep Finder atv# kill [Finder PID]
Restarting Finder takes a while… interesting. Wow. That was a long time. Then reboot, then to safe mode, then to reboot again, then long startup but it worked. Sorta. No nitoTV visible anywhere. Fail.
Back to searching for a fix. OMFG there’s a different link to the same version of nitoTV that has an installer. Deep cleansing breath. Now deep cleansing code:
ATV$ cd ~ ATV$ rm -rf nitoTV.frappliance/ ATV$ sudo rm -rf /System/Library/CoreServices/Finder.app/Contents/PlugIns/nitoTV.frappliance/
Cleaned. Now to push the new installer version out there (I changed the folder name after unzipping since I dislike dealing with spaces on the command line):
mac$ tar cvf ~/nitoTV.tar -C /Users/mps/Downloads/ nitoTV_Take_Two mac$ scp nitoTV.tar frontrow@10.0.0.219:~ ATV$ tar xvf nitoTV.tar ATV$ cd nitoTV_Take_Two/ ATV$ sudo ./installme installer: Package name is nitoTV 0.4.8 installer: Installing onto volume mounted at /. installer: The install was successful. Restarting Finder...
And Finder did indeed restart – holy MACKEREL there’s a new entry. Reading the notes (wow, what a concept) it says it looks in /Users/frontrow/Applications for the apps… but that’s not where I put MythTV. So:
atv$ cd ~ atv$ mkdir Applications atv$ mv /Applications/MythFrontend.app/ ./Applications/ mv: rename /Applications/MythFrontend.app/ to ./Applications/MythFrontend.app/: Read-only file system [ed: whoops, the installer tweaked my earlier settings] atv$ sudo -s atv# mount -o remount,rw /dev/disk0s3 / atv# mv /Applications/MythFrontend.app/ ./Applications/
and presto! it appears in the Applications list within Nito. However, it dies fast. That’s OK, I know more about it now… having retrieved 10.4 versions of the files:
mac$ scp /Users/mps/vim frontrow@10.0.0.219:~ mac$ scp /Users/mps/nano frontrow@10.0.0.219:~ mac$ scp /Users/mps/su frontrow@10.0.0.219:~
atv# mv vim /usr/bin/ atv# mv su /usr/bin/ atv# mv nano /usr/bin/ atv# ln -s /usr/bin/vim /usr/bin/vi atv# vi ~/.mythtv/mysql.txt bash: /usr/bin/vi: Bad CPU type in executable atv# nano bash: /usr/bin/nano: Bad CPU type in executable
Well, curses! And here I thought we were going to work now… cleaning up again.
atv# rm /usr/bin/vi atv# rm /usr/bin/vim atv# rm /usr/bin/nano atv# rm /usr/bin/su
So that means it’s not as easy as I thought… going back to the source disk:
mac$ sudo pax -r -p e -z -f /Volumes/Mac\ OS\ X\ Install\ Disc\ 1/System/Installation/Packages/BSD.pkg/Contents/Archive.pax.gz './usr/bin/vim' mac$ sudo pax -r -p e -z -f /Volumes/Mac\ OS\ X\ Install\ Disc\ 1/System/Installation/Packages/BSD.pkg/Contents/Archive.pax.gz './usr/bin/nano' mac$ sudo pax -r -p e -z -f /Volumes/Mac\ OS\ X\ Install\ Disc\ 1/System/Installation/Packages/BSD.pkg/Contents/Archive.pax.gz './usr/bin/su' mac$ scp /Users/mps/usr/bin/vim frontrow@10.0.0.219:~ mac$ scp /Users/mps/usr/bin/nano frontrow@10.0.0.219:~ mac$ scp /Users/mps/usr/bin/su frontrow@10.0.0.219:~ atv# mv vim /usr/bin/ atv# mv su /usr/bin/ atv# mv nano /usr/bin/ atv# ln -s /usr/bin/vim /usr/bin/vi atv# vi ~/.mythtv/mysql.txt
Ladies and Gentlemen, we have an editor! Of course, for some odd reason vi isn’t accepting my keyboard arrow mappings, so we shift to nano…
nano ~/.mythtv/mysql.txt
Update the settings. Restart the ATV. Pick the MythFrontend.app – and no joy. Found another page on AwkwardTV that references the fonts issue mentioned on the MythTV HowTo, trying those steps:
mac$ scp /Library/Fonts/Trebuchet\ MS* frontrow@10.0.0.219:~ mac$ scp /Library/Fonts/Arial* frontrow@10.0.0.219:~ mac$ scp /System/Library/Fonts/Geneva.dfont frontrow@10.0.0.219:~
atv$ sudo su su: initgroups failed: Operation not permitted [grrrr, guess this isn't as easy as it should be] atv$ sudo -s atv# mv Arial* /Library/ atv# mv Trebuchet\ MS* /Library/ atv# mv Geneva.dfont /System/Library/Fonts/ atv# shutdown -r now
Wait for reboot… go to the app… we have a setup screen! Many notes say it’s easier to set it up from VNC than on the remote, so next step is setting up VNC.
atv# echo 71463E00FFDAAA95FF1C39567390ADCA > /Library/Preferences/com.apple.VNCSettings.txt atv# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes sudo: /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart: command not found
Oops, broke. OK, looking for VNC instructions for a Take2 version (scroll down on that page):
atv# cd ~ atv# sudo dd if=/dev/disk0s2 of=recovery.dmg bs=1m atv# sudo hdiutil mount recovery.dmg atv# sudo hdiutil mount /Volumes/Recovery/OS.dmg atv# cp -pr /Volumes/OSBoot\ 1/System/Library/CoreServices/RemoteManagement/ /System/Library/CoreServices/RemoteManagement atv# cp -pr /Volumes/OSBoot\ 1/System/Library/Perl/ /System/Library/Perl/ atv# cp -pr /System/Library/Perl/Extras/5.8.6/ /System/Library/Perl/5.8.6/ (already created the VNCSettings.txt file above, if you skipped that do it now) atv# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes atv# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users frontrow -privs -all -restart -agent -menu atv# /System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/MacOS/AppleVNCServer
… but it keeps running in your SSH session, so that’s not 100% ideal. Well, tradeoffs… I can afford another SSH session
So I downloaded Chicken of the VNC to get access. It worked pretty well, but then the screensaver took over and I couldn’t see what I was doing. Rebooted the ATV and went to the screensaver, turned it to “Never”. After all, I turn off my TV, not let it burn energy just for the heck of it.
OK, so I can’t get the remote to work now. Monkeyed around with trying to get a local keyboard working and no luck there either. I’m stymied. Time to ask on the forums.





