Mike Henderson Posted January 1, 2023 Share Posted January 1, 2023 How can I set Adobe Reader as default for all my users and macs? Link to comment Share on other sites More sharing options...
Moderators Josh Levitsky Posted January 2, 2023 Moderators Share Posted January 2, 2023 This is one approach https://technology.siprep.org/using-duti-to-script-default-applications-for-macs/ and would be good if you always wanted to enforce certain default apps. duti has always made setting default apps fairly easy. Link to comment Share on other sites More sharing options...
Moderators Josh Levitsky Posted January 2, 2023 Moderators Share Posted January 2, 2023 I used ChatGPT and popped out this code as well. It'll walk through all the users with an ID above 500 which should be all normal users, and use the duti command to set Adobe Reader for every user. duti won't be on the machine unless you put it there but you could use https://formulae.brew.sh/formula/duti to get it on your machine and then package up the /usr/local/bin/duti terminal command to use it in the script. I tested this and it did switch the 3 accounts on my laptop to use Reader. #!/usr/bin/env zsh # Get a list of all users on the system users=( $(dscl . -list /Users UniqueID | awk '$2 > 500 {print $1}') ) # Loop through each user for user in "${users[@]}"; do # Run the duti command as the current user su "$user" -c "/usr/local/bin/duti -v -s com.adobe.Reader pdf all" done Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now