Skip to content

Instantly share code, notes, and snippets.

@midore
Created October 11, 2012 03:53
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save midore/3870057 to your computer and use it in GitHub Desktop.
Save midore/3870057 to your computer and use it in GitHub Desktop.
disable-RemoteDesktop
#!/bin/bash
# Disable iSight
# OS X 10.8.2
home=$HOME
bk=$home/backup-isight-extentions
mkdir $bk
#---------------------------------------------------------------------
# Extenstions
#---------------------------------------------------------------------
# Disable iSight
sudo mv /System/Library/Extensions/Apple_iSight.kext $bk
sudo mv /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/ $bk
#---------------------------------------------------------------------
# touch
sudo touch /System/Library/Extensions
echo 'Shut Down & Start'
#!/bin/bash
# disable RemoteDesktop
# OS X 10.8.2
# https://gist.github.com/3870057
home=$HOME
bk=$home/backup-remotedesktop-extentions
mkdir $bk
#---------------------------------------------------------------------
# Agent
#---------------------------------------------------------------------
# RemoteDesktop
launchctl unload -w /System/Library/LaunchAgents/com.apple.RemoteDesktop.plist
# Screnshare
launchctl unload -w /System/Library/LaunchAgents/com.apple.screensharing.agent.plist
# AFP
launchctl unload -w /System/Library/LaunchAgents/com.apple.afpstat.plist
#---------------------------------------------------------------------
# Daemon
#---------------------------------------------------------------------
# RemoteDesktop
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.RemoteDesktop.PrivilegeProxy.plist
# AFP
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.afpfs_checkafp.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.afpfs_afpLoad.plist
#---------------------------------------------------------------------
# Extenstions
#---------------------------------------------------------------------
sudo mv /System/Library/CoreServices/RemoteManagement $bk
#---------------------------------------------------------------------
# touch
sudo touch /System/Library/Extensions
echo 'Shut Down & Restart'
@oderwat
Copy link

oderwat commented Aug 30, 2013

Hey! Why do you refer to "/System/Library/LaunchAgents/com.apple.afpstat.plist"? It wants to load "/usr/local/bin/afpstat" which is not a valid file on any original mac system. I am currently researching where this files comes from and just wonder why you have it in your gist. Do you have any more information about that file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment