These commands are especially useful in remote access situations, using ssh. See my post about SSH here. These commands all work in OS X 10.7 Lion. Many of them will not work in earlier versions of OS X.
Screen Sharing
on:
1 |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist |
off:
1 |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist |
Remote Management
on:
1 |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -activate -access -on -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw spectrum -restart -agent |
off:
1 |
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off |
FTP Server
on:
1 |
launchctl load -w /System/Library/LaunchDaemons/ftp.plist |
off:
1 |
launchctl unload /System/Library/LaunchDaemons/ftp.plist |
Simple Web Server
on:
1 |
python -m SimpleHTTPServer $port >> ~/simple_http.log& |