K1000: Best way to open a url via script on Mac
Hi all,
As the title suggests, I'm trying to open a URL on demand via KACE. I've tried creating an online shell script with:
open http://google.com
It works fine when I run it locally on the Mac - but not via the KACE Script I created. I get the error:
LSOpenURLsWithRole() failed for the application...
I also tried moving the command into a separate script, adding it as a dependency and calling it via the KACE Script - but I get the same error.
Does anyone know how to achieve this?
Cheers,
Kev
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
Jbr32
11 years ago
This works as a online shell script. Works for me.
open -a Safari http://google.com
Comments:
-
and yet not for me!
I get:
LSOpenURLsWithRole() failed for the application /Applications/Safari.app with error -10810 for the URL http://google.com.
I tried running the script as 'User logged in to console' & 'local system' - but I get the same result.
If I browse to the cached script location using Terminal on the Mac and run it using sudo, it works fine.
Any ideas what might cause this? - knug 11 years ago -
What version of OSx are running? - Jbr32 11 years ago