[Casper] Script to open an app after install
Ryan Harter
rharter at uwsp.edu
Tue Feb 3 12:49:31 PST 2009
This is probably not a good idea (if it will even let you) since these
scripts are run as root. If you do succeed in opening an app like
that it will most likely open in the root context which is a really
really really bad idea.
One thing you could try is su'ing as the user.
#!/bin/bash
USER=$3 # From Casper
su $USER -c "open /Applications/Utilities/MyApp.app"
or
su $USER -c "/Applications/Utilities/MyApp.app/Contents/MacOS/MyApp"
A lot of times open doesn't like being run from a script unless it is
run from the current GUI user.
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu
On Feb 3, 2009, at 2:36 PM, Dagel, Rich wrote:
> I am trying to write a script that will open an app once it is
> installed by a policy. I have to script set to run after but no luck.
>
> #!/bin/sh
>
> open /Applications/Utilities/MyApp.app
>
>
> Rich Dagel
> Senior Technology Specialist
> <image.gif>
> Landor Associates
> 1001 Front Street
> San Francisco, CA 94111
> United States
> 415 365 3933
> http://www.landor.com
> Rich.Dagel at landor.com
> <ATT00001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090203/119f645a/attachment.htm
More information about the Casper
mailing list