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

From AwkwardTV
Jump to: navigation, search
(made the page nicer by adding heatings and TOC)
m
 
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
==IDIOTS GUIDE TO ATV COMMNADS==
+
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.
  
===HOW TO KILL FINDER===
+
==Kill Finder.app==
 +
kill $(ps ax | grep [F]inder | cut -c 1-5)
  
ps ax | grep finder
+
==Mount/unmount a dmg file==
 +
===Unmounting===
 +
hdiutil detach /Volumes/<name of image>
  
Example:
+
If that doesn't work:
Look for the /System/Library/CoreServices/Finder.app/Contents/Mac0
 
should have a number like 500
 
  
Kill 500
+
hdiutil detach -Force /Volumes/<name of image>
  
''via script''
+
===Mounting===
kill `ps ax|grep [F]inder|cut -b 2-5`
+
hdiutil mount someimage.dmg
  
 +
==Remount your root (/) file system read/write==
 +
* needs to be executed as root user (see above)
 +
mount -rw /dev/disk0s3 /
  
===HOW TO MOUNT AND UNMOUNT DMG===
+
==Move files around==
 +
* might need to have the root file system mounted in read/write mode
 +
mv /file/you/want/to/move /target/location/
  
Example:
+
==Start shlight==
UNMOUNT COMMAND
+
* 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
  
-bash-2.05b$ hdiutil detach /Volumes/yadafile\ with yada space
+
==Add a host to /etc/hosts==
 +
echo -e "<ip>\t<servername>" >> /etc/hosts
  
MOUNT COMMAND
+
==Get a screen capture of your AppleTV==
 +
screencapture -s filename.png
  
hdiutil mount yadaimage.dmg
+
==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)
  
  
===HOW TO MOVE FILES AROUND===
 
  
First run
 
sudo mount -uw /
 
  
Then sudo mv /current location /future location
+
[[Category:How-to]]
 
 
Example to move:
 
 
 
sudo mv /Users/frontrow/A52Codec.component /Library/Audio/Plug-Ins/Components/
 
 
 
sudo mv /Users/frontrow/AC3MovieImport.component /Library/QuickTime/
 
 
 
sudo mv /Users/frontrow/Perian.component /Library/QuickTime/
 
 
 
sudo mv /Users/frontrow/ATVFiles.component /System/Library/CoreServices/Finder.app/Contents/PlugIns
 
 
 
 
 
===TO START SHLIGHT===
 
 
 
Example
 
/usr/sbin/shlight //***.**.1.100/atv /Users/frontrow/Movies/yadashare
 
 
 
'''***make sure the /etc host file has the pc name correct***'''
 
 
 
Host f##
 
 
 
yada yada add your info at the bottom like this
 
 
 
1**.***.1.100 PCNAME
 
 
 
 
 
===TO GET A SCREEN CAPTURE OF YOUR ATV===
 
 
 
screencapture -s filename.png
 
 
 
 
 
===TO ACTIVATE PHP COVER ART===
 
 
 
php d:\yadashare\covergrabber.php d:\yadashare All
 

Latest revision as of 05: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)