8

I need to get a Google Packaged App to run at system startup. So, when the OS boots, it automatically loads my app.

Any way to do this in Google Chrome??

Thanks in advance.

1

1 Answer 1

14

If you literally want your app to start up "when the OS boots", then the answer is: You can't.

Otherwise, if it's OK if your app starts when the user logs in, add the "background" permission to your manifest file.

Permission "background"

Makes Chrome start up early and and shut down late, so that apps and extensions can have a longer life.

When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome.

The "background" permission is only available for hosted apps, legacy packaged apps and extensions, not for Chrome apps.

If you want to use the "background" permission in a Chrome App, then the only way to do this is to get the extension whitelisted. This can be done using the --whitelisted-extension-id flag:

chromium --whitelisted-extension-id=[YOUREXTENSIONID - 32 chars a-p]

You can only have one extension whitelisted via the command-line, so this should only be used for testing. If you want to publish your app with the background permission, then you're out of luck. The permission was intentionally disabled by the Chromium team, see https://code.google.com/p/chromium/issues/detail?id=163770.

4
  • That's great, annoying that its not possible unless user logs in. But, for my purposes, this is more than enough.
    – Imme22009
    Jul 26, 2013 at 14:20
  • This doesn't seem to work for me. When I add that permission I get: "There were warnings when trying to install this extension: 'background' is only allowed for extensions, hosted apps, and legacy packaged apps, but this is a packaged app." Jan 29, 2014 at 8:57
  • @JeffreyBasurto I've updated my answer to clarify that "packaged app" means "legacy packaged app". I've also added a method to get the background permission for the Chrome Apps, it only works for personal use.
    – Rob W
    Jan 29, 2014 at 9:19
  • Maybe at the time this answer, the next couldn't be done. On Mac, you can add a shortcut (right click on the app in Chrome Apps screen in Chrome browser, create shortcut). Then, call in a terminal "[ChromeAppLocation]/Contents/MacOS/app_mode_launcher". For example, in my case is something like this: /Users/admin/Applications/Chrome\ Apps.localized/Default\ knipolnnllmklapflnccelgolnpehhpl.app/Contents/MacOS/app_mode_loader
    – kanobius
    Oct 2, 2015 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.