/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: Jbr32 11 years ago
10th Degree Black Belt
2

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ