Skip to main content
Solved

Duti question

  • February 8, 2021
  • 2 replies
  • 15 views

d_mccullough
Forum|alt.badge.img+6

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

Best answer by cbrewer

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.

2 replies

Forum|alt.badge.img+15
  • Esteemed Contributor
  • Answer
  • February 8, 2021

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
Forum|alt.badge.img+6
  • Author
  • Contributor
  • February 9, 2021

Thanks! Running the commands as current-user worked.