Open popaprozac opened 10 months ago
Looks like removing the sudo command from the rebuild fixes the issue. Will submit a PR asap.
@popaprozac 2 questions:
The script tries to reset the LS database as the currently signed in user or root, depending on the context. My concern is that removing sudo altogether could cause issues in certain contexts (e.g. Setup Assistant).
Thanks for the follow up!
The package is deployed via MDM but the script is run separately via a policy. I found that removing sudo from msda when running the policy via MDM or locally (both situations with a logged in user) it runs as expected. When running locally I use sudo msda
but the script run via policy omits the sudo.
Same issue here - any ideas how to fix it? - Running the script through JAMF
I suffer from the same issue.
I could fix it as mentioned by the OP by running
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -all local,system,user
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -seed
as local user (NOT root). The weird thing is that I did run it as
sudo -u localuser cmd
which is identical to what your script does... however, it seems to fail in your case for some obscure reason. So my solution is to simply run above commands at the end of my script...
I'm working on v2 of this app under the jxa-v2
branch. It should resolve this issue. I don't have an ETA at this time, but I'll follow up once it's released.
Great thank you!
Issue System Settings fails to open after setting a default app
Steps to reproduce
msda set com.google.chrome -p http -p https -u public.url all -u public.html viewer -u public.xhtml all -fut
or anyset
command.Symptoms After setting any app as a default app, System Settings fails to load properly. The app launches but does not display any windows and this is the View menu:
Workaround I have been able to reset the LaunchServices and open System Settings by running the following:
The good news is the change is applied successfully so after resetting all LaunchServices System Settings open and the default app is set correctly.