Difference between revisions of "Install Top"

From AwkwardTV
Jump to: navigation, search
(Updating category to include a sort parameter; making instructions a numbered list; fixing link)
Line 8: Line 8:
 
fine. Basic instructions...
 
fine. Basic instructions...
  
Get source here: http://www.opensource.apple.com/darwins ... 0.4.9.x86/
+
#Get source here: http://www.opensource.apple.com/darwinsource/10.4.9.x86/ . Scroll down to: top-17.4
Scroll down to: top-17.4
+
#Download source. You'll need to have registered as an Apple developer (remember, it's free).
 
+
#Unpack, then in Terminal, CD into the directory and type "make"
Download source. You'll need to have registered as an Apple developer (remember, it's free).
+
#There will be an error at the end because by default, the Makefile tries to install the newly built "top", but you didn't run it with "sudo". That's okay, you don't actually want to install it on your Mac.
 
+
#Copy the new version to your AppleTV, either with scp or drag and drop if you've got its drive mounted.  
Unpack, then in Terminal, CD into the directory and type "make"
+
#Then move it into /usr/bin.
 
+
#You need to give it special permissions since it does system stuff:
There will be an error at the end because by default, the Makefile tries to install
+
<pre>sudo chown root:wheel /usr/bin/top
 
+
sudo chmod 4755 /usr/bin/top</pre>
the newly built "top", but you didn't run it with "sudo". That's okay, you don't actually
 
 
 
want to install it on your Mac.
 
 
 
Copy the new version to your AppleTV, either with scp or drag and drop if you've
 
 
 
got its drive mounted. Then move it into /usr/bin.
 
 
 
You need to give it special permissions since it does system stuff:
 
 
 
sudo chown root:wheel /usr/bin/top
 
 
 
sudo chmod 4755 /usr/bin/top
 
  
 
Then, just type top ! (/usr/bin always in search path)
 
Then, just type top ! (/usr/bin always in search path)
  
If you don't want to compile it yourself, I've attached the copy I just built (code is APSL license so it should
+
If you don't want to compile it yourself, I've attached the copy I just built (code is APSL license so it should be just fine to post the binary here): (MD5 of unzipped binary was 17b202a3d19c152123cec65c80e10d97)
be just fine to post the binary here): (MD5 of unzipped binary was 17b202a3d19c152123cec65c80e10d97)
 
  
 
[http://forum.awkwardtv.org/download.php?id=4&f=10 binary file]
 
[http://forum.awkwardtv.org/download.php?id=4&f=10 binary file]
  
 
+
[[Category:How-to|Top]]
[[Category:How-to]]
 

Revision as of 10:55, 31 October 2009

Quick guide to building (the binary is linked at the bottom of the page) the Top command line application on the Apple TV, originally posted by jMahn on the AwkTV forums, its come up a couple of times since so I figured put it in the main how-to section, if anybody has any other info or edits to this of course feel free, I've never posted on a wiki before - DaiMac79

(Original post is here) The version of the "top" command from OSX doesn't run on Apple TV (at least not the 10.4.9 version from my MacBook).

I was able to download the source for the Darwin version from Apple and it works just fine. Basic instructions...

  1. Get source here: http://www.opensource.apple.com/darwinsource/10.4.9.x86/ . Scroll down to: top-17.4
  2. Download source. You'll need to have registered as an Apple developer (remember, it's free).
  3. Unpack, then in Terminal, CD into the directory and type "make"
  4. There will be an error at the end because by default, the Makefile tries to install the newly built "top", but you didn't run it with "sudo". That's okay, you don't actually want to install it on your Mac.
  5. Copy the new version to your AppleTV, either with scp or drag and drop if you've got its drive mounted.
  6. Then move it into /usr/bin.
  7. You need to give it special permissions since it does system stuff:
sudo chown root:wheel /usr/bin/top
sudo chmod 4755 /usr/bin/top

Then, just type top ! (/usr/bin always in search path)

If you don't want to compile it yourself, I've attached the copy I just built (code is APSL license so it should be just fine to post the binary here): (MD5 of unzipped binary was 17b202a3d19c152123cec65c80e10d97)

binary file