Created
June 6, 2013 22:32
-
-
Save trinitronx/5725543 to your computer and use it in GitHub Desktop.
A script to enable hidden OSX 'Screen Sharing.app' featuresSource for OSX 'default' command lines: http://lifehacker.com/334759/add-more-functionality-to-leopards-screen-sharing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RESULT_ERROR=1 | |
disp_usage=1 | |
usage() | |
{ | |
echo "$(basename $0) [-t|-b] " >&2 | |
echo "" >&2 | |
echo "" >&2 | |
echo " Enables hidden OSX 'Screen Sharing.app' features" >&2 | |
echo "" >&2 | |
echo " -b Enable Bonjour Network Browser" >&2 | |
echo " -t Enable Control Toolbar" >&2 | |
echo "" >&2 | |
exit | |
} | |
#------------------------------------------------------------------------------- | |
# Get script options | |
#------------------------------------------------------------------------------- | |
while getopts "bth" opt; do | |
case $opt in | |
b ) defaults write com.apple.ScreenSharing ShowBonjourBrowser_Debug 1 ; disp_usage=0 ;; | |
t ) defaults write com.apple.ScreenSharing 'NSToolbar Configuration ControlToolbar' -dict-add 'TB Item Identifiers' '(Scale,Control,Share,Curtain,Capture,FullScreen,GetClipboard,SendClipboard,Quality)' ; disp_usage=0 ;; | |
h ) usage | |
exit $RESULT_ERROR ;; | |
* ) usage | |
exit $RESULT_ERROR ;; | |
esac | |
done | |
shift $(($OPTIND - 1)) | |
# positional_arg1=$1 | |
# positional_arg2=$2 | |
[ $disp_usage -eq 1 ] && usage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment