Skip to main content
Question

LaunchAgent Applescript

  • January 6, 2017
  • 1 reply
  • 0 views

Forum|alt.badge.img+7

Can't find what I'm looking for through searching.. so I am going to post up here.

I am trying to get the defaultbrowser program working, and it is but I get that silly prompt each time asking me if I want to keep Firefox or use Chrome. I made an Applescript that presses the "Use Chrome" button in the dialog box but then Accessibility shows up when I run it the first time and I have to confirm it in System Prefs. Is there any way around this? Currently I am running the Applescript as a LaunchAgent.

1 reply

Forum|alt.badge.img+7
  • Author
  • Contributor
  • 77 replies
  • January 6, 2017

Figured it out.

  1. Need tccutil.py installed to insert the compiled Applescript into Security & Privacy -> Accessibility
  2. Need to install defaultbrowser
  3. Create LaunchAgent that calls the Applescript
  4. Profit

tccutil.py was the missing link. I see the window at login asking me if I want to change the browser to chrome for a split second.. and then the rest of the Applescript takes care of that. Now to create a package/policy.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings