Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # ------------------------------------------------------------------------------
- #
- # If you use Mozilla then you can use:
- # https://addons.mozilla.org/en-US/firefox/addon/flash-aid/
- #
- # This script is for NON-Mozilla users. You can set different configurations
- # to turn off crashes in Flash, blue-peoples-bug and the like.
- #
- # Also fiddling around with enabling and disabling HardwareAcceleration (rightclick on video)
- # can help you. Sometimes ...
- #
- # Remember to refresh the page to let the changes take effect.
- #
- # OverrideGPUValidation = $1, only 0 or 1. else nothing happens.
- # EnableLinuxHWVideoDecode = $2, same as above.
- #
- # Some settings and how they behave:
- #
- # Firefox 16.0.2
- # Settings YouTube Vimeo GameTrailers
- # OverrideGPUValidation=1
- # EnableLinuxHWVideoDecode=1 Works Crashes plugin Crashes plugin
- #
- # OverrideGPUValidation=1
- # EnableLinuxHWVideoDecode=0 Bad Colours Works Works
- #
- # OverrideGPUValidation=0
- # EnableLinuxHWVideoDecode=1 Works Crashes plugin Crashes plugin
- #
- # OverrideGPUValidation=0
- # EnableLinuxHWVideoDecode=0 Bad Colours Works Works
- #
- #
- # Chrome 23.0.1271.64
- # Settings YouTube Vimeo GameTrailers
- # OverrideGPUValidation=1
- # EnableLinuxHWVideoDecode=1 Crashes plugin Crashes plugin Crashes plugin
- #
- # OverrideGPUValidation=1
- # EnableLinuxHWVideoDecode=0 Bad Colours Works Works
- #
- # OverrideGPUValidation=0
- # EnableLinuxHWVideoDecode=1 Crashes tab Crashes tab Crashes tab
- #
- # OverrideGPUValidation=0
- # EnableLinuxHWVideoDecode=0 Bad colours Works Works
- #
- # ------------------------------------------------------------------------------
- MMSCFGPATH="/etc/adobe"
- MMSCFGNAME="mms.cfg"
- MMSTEMP="mms.cfg.tmp"
- fat='\033[1m'
- nf='\033[0m'
- if [ "$(id -u)" != "0" ]; then
- echo -e "\t${fat}You need the proper rights to edit $MMSCFGPATH/$MMSCFGNAME ! ${nf}"
- return 1
- fi
- if [ -e $MMSCFGPATH/$MMSCFGNAME ]; then
- echo -e "\t${fat}$MMSCFGPATH/$MMSCFGNAME found. ${nf}"
- else
- echo -e "\t${fat}$MMSCFGPATH/$MMSCFGNAME NOT found.${nf}"
- return 1
- fi
- case $1 in
- 0|1)
- sed s#".OverrideGPUValidation.*"#"OverrideGPUValidation=$1"# $MMSCFGPATH/$MMSCFGNAME > $MMSCFGPATH/$MMSTEMP
- ;;
- *) echo "$1: 0 or 1 only." ;;
- esac
- case $1 in
- 0|1)
- sed s#".EnableLinuxHWVideoDecode.*"#"EnableLinuxHWVideoDecode=$2"# $MMSCFGPATH/$MMSTEMP > $MMSCFGPATH/$MMSCFGNAME
- ;;
- *) echo "$2: 0 or 1 only." ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment