View Full Version : [Apple TV] Easier way to install Python on ATV
Hi. I got XBMC up and running on my ATV and love it. Some of the skins look amazing. So now I would like to start playing around with some of the scripts and plugins out there. If I understand it right, I need to install python on my appletv in order for plugins/scripts to work. I've read the instructions on Awkwardtv, but they are pretty extensive and fairly complicated (I'm not a linux/unix guy). Is there any other way to get Python setup? I typically transfer files to and from my Appletv using SFTP (using Panic's Transmit software for the mac).
Any hints or tips would be appreciated.
Thanks...
Kevin
dafranca
2008-11-14, 00:25
Open txt editor of choice, copy and paste the following link:
http://pastebin.com/m74e02a69
Save file.txt as txt (no rtf)
move file to appletv home folder on ATV.
ssh to the ATV.
execute:
sudo sh file.txt
dafranca
2008-11-14, 01:03
Remember your ATV needs internet conection... check if you are connect
If you get any erro menssage you probably don't have wget and gunzip installed.
Install wget and gunzip on atv
http://wiki.awkwardtv.org/wiki/Apple_TV_Binaries
right click(# click) on wget & gunzip "save as".
Transfer wget & gunzip to atv
open ssh conection with atv
execute => sudo mv {wget,gunzip} /usr/bin/
execute => sudo chmod 755 /usr/bin/{wget,gunzip}
execute => sudo chown root:wheel /usr/bin/{wget,gunzip}
execute the script again => sudo sh file.txt
fluked@live.com
2008-11-14, 21:13
didnt work for me
m_lopez_h
2008-11-14, 21:38
Didnt work for me either. I was able to transfer the file.txt and execute the sudo command. It failed when it got to the "wget" and "pax" commands. I assume that wget and pax needs to be installed prior to running the script?
fluked@live.com
2008-11-14, 21:44
I think the person who offered the advice was offering a shortcut to typing, not to the actual process.
Apparently, you need to install an unarchiver, which i went to the website to do, from awkward wiki, but AGAIN complex coding and instructions.
I dont know what the developer disc 4 thing is all about....
*shrug*
dafranca
2008-11-14, 23:18
pax is installed on all ATV.
If you got error is because you don't have wget binary installed:
wget is used to download files from www
fluked@live.com
2008-11-14, 23:35
I used method 2....
file.txt: line 22: syntax error: unexpected end of file
Any ideas?
fluked@live.com
2008-11-14, 23:39
ok, was error in copying.....
Now it just returns to 'bash
dafranca
2008-11-14, 23:46
I used method 2....
file.txt: line 22: syntax error: unexpected end of file
Any ideas?
line 22? it is only 21 lines on the script... you probabily have created an rtf text file.
connect to ATV and type: cat file.txt
you should only see 21 lines that you prior have copied and pasted, if you see same header it will not work. On your text editor you should have saved as text file.
fluked@live.com
2008-11-14, 23:47
Yes, it was a copying error.... and no its a txt file.
I am using a ppc mac.
Anything else i need to do?
dafranca
2008-11-14, 23:53
test if it is working:
type: python --version
You should get this:
Python 2.5
fluked@live.com
2008-11-14, 23:56
Nope.
bash: python: command not found
dafranca
2008-11-14, 23:58
Maybe you need to reboot atv...
if doesn't work... run the script again... copy and paste the error here.
fluked@live.com
2008-11-15, 00:11
ATV rebooted....
Again, it just returns to bash.... ie its not doing anything
dafranca
2008-11-15, 00:21
I recommend you install wget and gunzip on your atv
fluked@live.com
2008-11-15, 00:23
:laugh: You reckon? lol
Can you tell me how to install gunzip? I had no luck.
get the following file;
http://code.google.com/p/atvusb-creator/source/browse/trunk/atvusb-creator/payloads/patchstick/packages/binutils/binutils.tar.gz
This contains a bunch of bin utils that will work on the AppleTV. unpack and copy the files (not the folder) into "/usr/bin" on the AppleTV. wget and gunzip are included.
"top" will need a post copy change. "sudo chmod +s /usr/bin/top".
fluked@live.com
2008-11-15, 01:19
Thanks for the replys guys.
Please bear in mind that I am a noob, and not a coder.
= "/usr/bin" on the AppleTV.
Where is this, whats the full path??? I can only get into frontrow on cyberduck.
Also in using an APPLE TV.
"top" will need a post copy change. "sudo chmod +s /usr/bin/top"
Huhhhhhhhh?
I thought the bin tools came with the standard usb patch? Ok, i will give it a go.... please let me know where the files go.
Thanks for the replys guys.
= "/usr/bin" on the AppleTV.
Where is this, whats the full path??? I can only get into frontrow on cyberduck.
Also in using an APPLE TV.
"top" will need a post copy change. "sudo chmod +s /usr/bin/top"
I thought the bin tools came with the standard usb patch? Ok, i will give it a go.... please let me know where the files go.
These binutils have nothing to do with USB.
"/usr/bin" is the full path, note the "/" in front.
/usr/bin is protected so you have to do this in a two step.
1) copy them to /Users/frontrow
2) ssh in and manually move them from /Users/frontrow to /usr/bin
google "appletv scp" and "appletv ssh" for more info.
fluked@live.com
2008-11-15, 03:27
I see.
But with cyberduck, i can only access frontrow....
No root access.
I have used ssh. And transfer via ftp, cyberduck
fluked@live.com
2008-11-15, 03:28
Actually forget it, this is just riddiculous.
Actually forget it, this is just riddiculous.
You're making this much harder by messing around with cyberduck. Use scp and ssh from the command-line.
Use the terminal Application in /Applications/Utilities on your OSX computer to get to the command-line.
curl http://code.google.com/p/atvusb-creator/source/browse/trunk/atvusb-creator/payloads/patchstick/packages/binutils/binutils.tar.gz > binutils.tar.gz
tar -xzf binutils.tar.gz
scp -r binutils frontrow@appletv.local:/Users/frontrow
ssh frontrow@appletv.local
now you are on the AppleTV and inside the directory "/User/frontrow"
sudo cp /User/frontrow/binutils/* /usr/bin/
enter "frontrow" when prompted for the password
sudo chmod +s /usr/bin/top
if "appletv.local" does not work, use the IP address of your AppleTV.
fluked@live.com
2008-11-15, 03:54
thank you.
but this is wasting my life and time.
i appreciate your 'help, but im wasting time, keep going back anf forwards, and people with different ideas and storys.
This is supposed to be THE EASY WAY, lol.
fluked@live.com
2008-11-15, 04:09
:-P
thank you.
but this is wasting my life and time.
:)
m_lopez_h
2008-11-15, 09:48
Ok, I've installed the binutils (I had to change the permissions on wget for the script to run) and am now stuck on the final part of the script. For some reason the pax command won't execute. Any thoughts?
pax: could not exec: Permission denied
pax: End of archive volume 1 reached
pax: Sorry, unable to determine archive format.
ln: /usr/bin/python: File exists
ln: /Library/Frameworks/Python.framework/: File exists
-bash-2.05b$
-bash-2.05b$
fluked@live.com
2008-11-15, 12:20
I guess its something to do with gunzip????
fluked@live.com
2008-11-15, 12:32
Hey, there is quite alot of info in thise post.....
Would anybody like to start a new topic, which outlines a step-by-step guide???
As at the moment, some steps are before another and make asumptions.... which kinda makes it longer than it needs to be!!
A Milton
2008-11-15, 13:20
Just a thought: If you need python installed on the Apple TV to run XBMC plugins/scripts, shouldn't the installation of python be handled via ATV USB Creator?
I think it's a bit much to ask "n00bs" to install wget and binutils and whatnot just to get plugins going.
If you could just say "repatch the atv with the latest ATV USB Creator and you shall be golden" it would be great :D
Ok, I've installed the binutils (I had to change the permissions on wget for the script to run) and am now stuck on the final part of the script. For some reason the pax command won't execute. Any thoughts?
pax: could not exec: Permission denied
pax: End of archive volume 1 reached
pax: Sorry, unable to determine archive format.
ln: /usr/bin/python: File exists
ln: /Library/Frameworks/Python.framework/: File exists
-bash-2.05b$
-bash-2.05b$
"Permission denied" is a BIG hint that you might need a "sudo" in front of you command :)
I think it's a bit much to ask "n00bs" to install wget and binutils and whatnot just to get plugins going.
If you could just say "repatch the atv with the latest ATV USB Creator and you shall be golden" it would be great :D
I do recommend that binutils be installed along with xbmc/boxee install. It's a selection in atvusb-creator. BUT for some reason, most users will uncheck the binutils selection (defaulted to install).
You can make a new patchstick with just binutils selected but if you want to install a full blown python, that still needs to be done manually. AlTheKiller raised a good point with python. XBMC uses an internal build of python for the running of python scripts so you should NOT need to install python in order to run python scripts from inside XBMC.
A Milton
2008-11-15, 17:01
So installing python should only be necessary for testing/development purposes? Not necessary for end users? That's not a problem then.
I do recommend that binutils be installed along with xbmc/boxee install. It's a selection in atvusb-creator. BUT for some reason, most users will uncheck the binutils selection (defaulted to install).
Is there a reason to have sshd and binutils selectable? Most (if not all) users probably want to have those installed any way, and you can solve the problem with users deselecting them by making them mandatory. Just my 2 cents.
Is there a reason to have sshd and binutils selectable? Most (if not all) users probably want to have those installed any way, and you can solve the problem with users deselecting them by making them mandatory. Just my 2 cents.
User Choice :) I do have them defaulted to selected so some users are manually de-selecting them. Not sure why.
ssh need to be selectable in case the AppleTV is already has sshd installed. ATVUSB-creator uses a standalone version of ssh (dropbear) and I'm not sure what will happen if both flavors are installed.
binutils, possible to hide that and auto-install. Over-writing these is not a problem.
They are not showing right now but there are many other packages planned for selection. ATVUSB-Creator is really targeted for general purpose AppleTV patchstick creation.
A Milton
2008-11-15, 18:27
ssh need to be selectable in case the AppleTV is already has sshd installed. ATVUSB-creator uses a standalone version of ssh (dropbear) and I'm not sure what will happen if both flavors are installed.
Couldn't the installer script sense if sshd is already installed and skip that part if that is the case?
They are not showing right now but there are many other packages planned for selection. ATVUSB-Creator is really targeted for general purpose AppleTV patchstick creation.
Yes, I understand that, but sshd and binutils should always be of interest regardless of the purpose of the patchstick IMHO.
I just think that fewer options would be better when giving support. It's simpler to ask if someone used ATV USB Creator than to ask if they used ATV USB Creator with sshd, binutils and whatever enabled.
This is getting quite offtopic. Feel free to delete or move to separate thread. Maybe a separate thread would be useful.