Post by sbtIn article
Post by justaguyHi,
Say, I have a start_myApp.sh shell script that would launch my program
or other's program for that matter. But I'd like this script to be
run automatically when Mac boots, and doing so programmatically. I
bet it can be done with Mac but how?
Thanks.
Do you really mean at boot time? Or, do you mean at login to your
account? If the latter, make sure it is set to be executable and add it
to your account's login items (System Preferences, either Accounts or
Users & Groups depending on what version of MacOS X you're running).
If you really mean "at boot time" (i.e. before any account is logged
in), that is really a bad idea from a security standpoint. However, it
can be accomplished by setting its ownership and privileges
appropriately and having it in /Library/StartupItems...you should note
that this is the method employed by example malware items (i.e. not
found "in the wild") to install keyloggers and the like.
--
Spenser
Thanks for the quick response. My app, sort of hybrid web app, that
is, it runs locally, hence, it works offline as well, it leverage a
web browser, and because of this nature, it relies on an app server
(Railo from Railo Technologies in Switzerland and a web server
(Jetty), both are open source, and small footprint in file size). So,
of course these guys need to be up and running when the Mac is booted,
then, my app can run off them, hence, the question.
So, now, say, the app and its "friends"'s folder is "KN", we have this
script named start-kn.sh. Now, how do we add a "symbolic" or "soft"
link to the /Library/StartupItems folder and do I need to grant
permission manually as well? Thanks again.