Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running commands through MDM #29

Open
xirianlight opened this issue Apr 28, 2020 · 3 comments
Open

Running commands through MDM #29

xirianlight opened this issue Apr 28, 2020 · 3 comments

Comments

@xirianlight
Copy link

Hey, glad you've built this tool - I can't get DUTI to work in Catalina, and so far swda seems to be getting the job done. I'm running commands in it through an MDM called Addigy and everything works except for setting browsers. Any time I push a command using the --web or --browser arguments, I get this response:

SwiftDefaultApps ERROR -10822: There was an error trying to communicate with the Launch Services Server.

Setting individual apps or even email clients works just fine, browser is the only one that doesn't. Using the same command on the computer locally in Terminal works just fine, it only fails when pushed through this external service. The command itself is:

/usr/local/bin/swda setHandler --web --app com.google.Chrome

Have any insight as to how the other arguments follow through for the current user while run via root in an MDM but this one doesn't?

Many thanks!

@Lord-Kamina
Copy link
Owner

Lord-Kamina commented Apr 28, 2020

I have no idea TBH. If I had to guess I'd say permissions issue due to Catalina. Maybe you have to give some special authorization to the MDM service or whatever is actually receiving the commands and calling swda?

Also you might want to try usinh swda setHandler --scheme http --app com.google.Chrome and see whether that works. If it does, it would suggest it might be an issue with argument handling (I doubt it though)

That error is a LaunchServices error code, not produced by swda itself; the app is merely forwarding to you the error it got from the LaunchServices api.

@xirianlight
Copy link
Author

xirianlight commented May 4, 2020 via email

@Lord-Kamina
Copy link
Owner

Thanks for the feedback - the command rejects --scheme as a usable option and kicks back an error. I'll try to figure out if there's something else I can do via permissions where Terminal is able to execute the normal command but this agent isn't. -r

My bad, I gave you a bad instruction. It's not --scheme but --URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants