electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

The linux snap configaration - autoStart already supported string as a value

Open nojsja opened this issue 4 years ago • 2 comments

  • Electron-Builder Version: 23.0.3
  • Node Version: 14.17.6
  • Electron Version: 18.0.3
  • Electron Type (current, beta, nightly): current
  • Target: linux - snap

The linux snap configaration - autoStart shows that it must be a boolean value, but snap already supported string value as a auto launch desktop conf such as app-name.desktop.

autoStart = false Boolean - Whether or not the snap should automatically start on login.

Please check this link to get fully description.

{
...
"snap": {
    "summary": "Shadowsocks GUI with cross-platform desktop support",
    "autoStart": "shadowsocks-elecron.desktop",
    "grade": "stable"
  }
}

I tried it and the build task will failed with a warning:

⨯ Invalid configuration object. electron-builder 23.0.3 has been initialized using a configuration object that does not match the API schema.
 - configuration.snap.autoStart should be a boolean.
   -> Whether or not the snap should automatically start on login.

nojsja avatar Apr 11 '22 16:04 nojsja

I did a test.

After installing a snap generated with the "autoStart": true, option, the snap.yaml file contained: autostart: packagename.desktop

You can find the snap.yaml at: /snap/packagename/current/meta/snap.yaml

For what it's worth, I still needed to create a ~/snap/packagename/current/.config/autostart/packagename.desktop file for autostart to work.

joshua-redmond avatar Jan 20 '23 03:01 joshua-redmond

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.

github-actions[bot] avatar Jun 03 '25 00:06 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Jul 03 '25 00:07 github-actions[bot]