Is there a way to block widgets in Lion? We have students that are playing wdgt games and running other time wasting apps. Is there a policy or a script that could be run?
We changed the the owner on ~/Library/Widgets/ to root and then erased the contents. That will keep them from installing widgets manually. Then we change the permissions on the widget installer app to 770 (owned by root already), so they can't install new ones.
This way they can still use the stock widgets without being able to install any new ones. Script below.
user=`ls -l /dev/console | cut -d " " -f 4`
rm -r /Users/$user/Library/Widgets/
chown root:wheel /Users/$user/Library/Widgets
chmod 775 /Users/$user/Library/Widgets
chmod 770 /System/Library/CoreServices/Dock.app/Contents/Resources/Widget Installer.app
echo "Reset widgets folder and restriction widget installation" >> /var/log/jamf.log