Enable / Disable Screen Sharing in Terminal

/ Published in: Bash
Save to your folder(s)

Useful when logged in the server via ssh.
In Leopard, the file would be /Library/Preferences/com.apple.ScreenSharing.launchd

Copy this code and paste it in your HTML
  1. # To enable screen sharing:
  2. sudo sh -c "/bin/echo -n enabled > /private/etc/ScreenSharing.launchd"
  4. # To disable screen sharing:
  5. sudo sh -c "/bin/rm /private/etc/ScreenSharing.launchd"

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.