Difference between revisions of "Idiot's Guide to Basic UNIX Commands"

From AwkwardTV
Jump to: navigation, search
(idiots guide to atv commands)
m
 
(25 intermediate revisions by 8 users not shown)
Line 1: Line 1:
'''IDIOTS GUIDE TO SIMPLE ATV COMMANDS'''
+
This is a simple list of commands needed to install applications, plugins or do some other "unixy" stuff on the AppleTV.
  
'''HOW TO KILL FINDER'''
+
==Become root==
ps ax | grep finder
+
sudo -s
 +
* sudo will ask for the current user's password, which is "frontrow".
 +
* type "exit" to "undo" being root.
  
Example:
+
==Kill Finder.app==
Look for the /System/Library/CoreServices/Finder.app/Contents/Mac0
+
kill $(ps ax | grep [F]inder | cut -c 1-5)
should have a number like 500
 
  
Kill 500
+
==Mount/unmount a dmg file==
 +
===Unmounting===
 +
hdiutil detach /Volumes/<name of image>
  
KILL FINDER VIA SCRIPT
+
If that doesn't work:
kill `ps ax|grep [F]inder|cut -b 2-5`
 
  
 +
hdiutil detach -Force /Volumes/<name of image>
  
'''HOW TO MOUNT AND UNMOUNT DMG'''
+
===Mounting===
Example:
+
hdiutil mount someimage.dmg
UNMOUNT COMMAND
 
-bash-2.05b$ hdiutil detach /Volumes/ATVFiles\ 0.1.0
 
"disk1" unmounted.
 
"disk1" ejected.
 
-bash-2.05b$
 
  
Mount Command
+
==Remount your root (/) file system read/write==
hdiutil mount imagename.dmg
+
* needs to be executed as root user (see above)
 +
mount -rw /dev/disk0s3 /
  
'''HOW TO MOVE FILES AROUND'''
+
==Move files around==
First run
+
* might need to have the root file system mounted in read/write mode
sudo mount -uw /
+
mv /file/you/want/to/move /target/location/
  
Then sudo mv /current location /future location
+
==Start shlight==
 +
* needs [[Mount_a_Remote_Drive_via_SMBFS | shlight installed]]
 +
* if problems arise, please first add the servername to <code>/etc/hosts</code> (see below)
 +
/usr/sbin/shlight //<servername>/<sharename> /Users/frontrow/Movies/somemountpoint
  
Example to move:
+
==Add a host to /etc/hosts==
sudo mv /Users/frontrow/A52Codec.component /Library/Audio/Plug-Ins/Components/
+
echo -e "<ip>\t<servername>" >> /etc/hosts
  
sudo mv /Users/frontrow/AC3MovieImport.component /Library/QuickTime/
+
==Get a screen capture of your AppleTV==
 +
screencapture -s filename.png
  
sudo mv /Users/frontrow/Perian.component /Library/QuickTime/
+
==Shutdown/reboot/scheduler==
 +
sudo reboot
 +
sudo halt (I had some problems rebooting after this, not sure what it is)
 +
pmset sleepnow (does not work)
 +
pmset schedule sleep "05/05/09 22:08:00" (pmset: Error in scheduling operation)
 +
pmset schedule wakeorpoweron  "05/05/09 22:08:00" (pmset: Error in scheduling operation)
  
sudo mv /Users/frontrow/ATVFiles.component /System/Library/CoreServices/Finder.app/Contents/PlugIns
 
  
  
'''TO START SHLIGHT'''
 
  
Example
+
[[Category:How-to]]
/usr/sbin/shlight //***.168.***.100/atv /Users/frontrow/Movies/share
 
 
 
'''***make sure the /etc host file has the pc name correct***'''
 
 
 
'''TO GET A SCREEN SHOT OF YOUR ATV'''
 
screencapture -s filename.png
 
 
 
'''COMMAND FOR COVERGRABBER'''
 
php d:\avi\covergrabber.php d:\avi All
 
activates the php covergrabber.php works well
 

Latest revision as of 14:13, 25 May 2009

This is a simple list of commands needed to install applications, plugins or do some other "unixy" stuff on the AppleTV.

Become root

sudo -s
  • sudo will ask for the current user's password, which is "frontrow".
  • type "exit" to "undo" being root.

Kill Finder.app

kill $(ps ax | grep [F]inder | cut -c 1-5)

Mount/unmount a dmg file

Unmounting

hdiutil detach /Volumes/<name of image>

If that doesn't work:

hdiutil detach -Force /Volumes/<name of image>

Mounting

hdiutil mount someimage.dmg

Remount your root (/) file system read/write

  • needs to be executed as root user (see above)
mount -rw /dev/disk0s3 /

Move files around

  • might need to have the root file system mounted in read/write mode
mv /file/you/want/to/move /target/location/

Start shlight

  • needs shlight installed
  • if problems arise, please first add the servername to /etc/hosts (see below)
/usr/sbin/shlight //<servername>/<sharename> /Users/frontrow/Movies/somemountpoint

Add a host to /etc/hosts

echo -e "<ip>\t<servername>" >> /etc/hosts

Get a screen capture of your AppleTV

screencapture -s filename.png

Shutdown/reboot/scheduler

sudo reboot
sudo halt (I had some problems rebooting after this, not sure what it is) 
pmset sleepnow (does not work) 
pmset schedule sleep "05/05/09 22:08:00" (pmset: Error in scheduling operation) 
pmset schedule wakeorpoweron  "05/05/09 22:08:00" (pmset: Error in scheduling operation)