Duti question

d_mccullough
New Contributor III

Here's a fun one for you duti users out there... I'm attempting to use duti with this script to set defaults. The commands work when run locally, but when I attempt to use a script or a command in Files & Processes, they don't work. It also didn't work when added to the duti package as a postinstall script. 10.15.7 is the version of macOS; anyone seen this before? Might cdef behave differently?

#!/bin/sh

#makes outlook default mail program

/usr/local/bin/duti -s com.microsoft.outlook mailto

#makes outlook default calendar program

/usr/local/bin/duti -s com.microsoft.outlook ics all

#makes outlook default contacts program

/usr/local/bin/duti -s com.microsoft.outlook vcf all
1 ACCEPTED SOLUTION

cbrewer
Valued Contributor II

You probably want to script these in a way where you are running them as the user and not root. Also, I haven't used duti in some years. If you can't get it to work, take a look at SwiftDefaultApps.

View solution in original post

2 REPLIES 2

cbrewer
Valued Contributor II

You probably want to script these in a way where you are running them as the user and not root. Also, I haven't used duti in some years. If you can't get it to work, take a look at SwiftDefaultApps.

d_mccullough
New Contributor III

Thanks! Running the commands as current-user worked.