Permalink
Browse files

enable_assistive_devices now called from sizeup

  • Loading branch information...
1 parent d6593ca commit cc84e48bea1ebd00aa6f35a920d8d1279eba5dc0 Brian Cunnie committed Aug 17, 2012
Showing with 9 additions and 11 deletions.
  1. +8 −4 recipes/enable_assistive_devices.rb
  2. +1 −7 recipes/sizeup.rb
@@ -1,7 +1,11 @@
-execute "Enable Assistive Devices" do
- command "echo 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled"
- user WS_USER
+# May not work if System Preferences is open while this is running
+file "/private/var/db/.AccessibilityAPIEnabled" do
+ action :create_if_missing
+ content "a"
+ mode "0444"
end
-log_msg="'Enable Assistive Devices' has been turned on.\nThis makes your system less secure. To disable,\nSystem Preferences -> Accessibility -> (uncheck) Enable Assistive Devices"
+log_msg="'Enable Assistive Devices' has been turned on. This makes your system less secure
+(especially with regards to keylogging). To disable, do the following:
+System Preferences -> Accessibility -> (uncheck) Enable Assistive Devices"
log(log_msg) { level :warn }
View
@@ -1,17 +1,11 @@
unless File.exists?("/Applications/SizeUp.app")
+ include_recipe "pivotal_workstation::enable_assistive_devices"
remote_file "#{Chef::Config[:file_cache_path]}/sizeup.zip" do
source node["sizeup_download_uri"]
mode "0644"
end
- # May not work if System Preferences is open while this is running
- file "/private/var/db/.AccessibilityAPIEnabled" do
- action :create_if_missing
- content "a"
- mode "0444"
- end
-
# start up on login
execute "Start SizeUp automatically" do
command "defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '{ \"Path\" = \"/Applications/SizeUp.app\"; \"Hide\" = 0; }'"

0 comments on commit cc84e48

Please sign in to comment.