Getting the application to run on startup

I am creating a mac application using the atomic shell that lives on the menu bar. I was wondering what options I would have to run it at startup.

  • Do I need to do this manually by the user?
  • Do I need permission from the user for this?
  • How do I do this programmatically using node / bash?
  • Is there an existing thing in the Atom case?
  • Is there an existing module that can do this?
+4
source share
4 answers

Give the auto-launch module a try, it should do what you want. To answer your questions:

  • No
  • , Classier ™,
  • .
  • . .
+7

.

, , , LaunchAgent.

plist, , , plist /Library/LaunchAgents.

: -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ProgramArguments</key>
    <array>
        <string>My_executable</string>
        <string>some_command_line_parameter</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>Label</key>
    <string>com.mycompany.myapp</string>
</dict>
</plist>

My_executable ( .app, my_application.app/Contents/MacOS/my_binary) . atom_shell , , script - .

, URI.

0

side/applications/Atom.app/Content/resources . .

0

All Articles