Interface: SnapOptionsLegacy
Desktop-entry and runtime fields shared by all Linux targets and all snap core strategies.
Fields set under linux.* in your build config (i.e. on LinuxConfiguration) are
automatically cascaded into each snap core's options by LinuxTargetHelper.getSnapCore().
You do not need to duplicate them under snapcraft.core24.*, snapcraft.core22.*, etc.
Per-core values always take precedence when both are set.
Extends
Properties
after?
readonlyoptionalafter?:string[] |null
Names of snapcraft parts that must be built before the app part.
Defaults to ["desktop-gtk2"].
Use "default" to keep the default and add extras:
["default", "my-helper-part"].
allowNativeWayland?
readonlyoptionalallowNativeWayland?:boolean|null
Allow the snap to run with native Wayland support (--ozone-platform=wayland).
Defaults to false for Electron < 38 (legacy behaviour); true for Electron ≥ 38.
Set explicitly to override the version-based default.
appPartStage?
readonlyoptionalappPartStage?:string[] |null
Filesets controlling which files from the app part are staged into the snap.
Supports individual files, directories, globs, globstars, and exclusions (prefix !).
See Snapcraft filesets.
When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).
artifactName?
readonlyoptionalartifactName?:string|null
The artifact file name template.
Inherited from
TargetSpecificOptions.artifactName
assumes?
readonlyoptionalassumes?:string|string[] |null
Snapd features that must be present on the host before the snap can be installed.
autoStart?
readonlyoptionalautoStart?:boolean
Whether the snap should automatically start on login.
Default
false
buildPackages?
readonlyoptionalbuildPackages?:string[] |null
Debian packages required at build time (installed inside the build environment).
category?
readonlyoptionalcategory?:string|null
The application category.
Inherited from
compression?
readonlyoptionalcompression?:"xz"|"lzo"|null
Compression algorithm for the snap SquashFS image.
xz— smaller file, slower decompression (good for distribution).lzo— larger file, faster decompression (good for development iteration). Omit to use snapcraft's default (xz).
When not set, linux.compression is mapped automatically:
"store" → "lzo", "maximum" → "xz", "normal" → snapcraft default.
Explicitly setting this field always overrides the mapped value.
Template app builds (useTemplateApp) pack the image with the mksquashfs from the toolsets.appimage bundle. lzo requires a toolset other than the legacy "0.0.0", whose mksquashfs supports only gzip and xz.
confinement?
readonlyoptionalconfinement?:"strict"|"classic"|"devmode"|null
The type of snap confinement.
strict— recommended; the snap runs in a fully isolated sandbox.devmode— sandbox violations are logged but not enforced; for development only.classic— no confinement; equivalent to a traditionally packaged application. Requires Snap Store approval before publishing.
Default
strict
description?
readonlyoptionaldescription?:string|null
As description from application package.json, but allows you to specify different for Linux.
Inherited from
CommonLinuxOptions.description
desktop?
readonlyoptionaldesktop?:LinuxDesktopFile|null
The Desktop file
Inherited from
environment?
readonlyoptionalenvironment?: {[key:string]:string; } |null
Environment variables injected into the snap's runtime environment.
Merged with the electron-builder default { TMPDIR: "$XDG_RUNTIME_DIR" }.
User-supplied values take precedence.
executableArgs?
readonlyoptionalexecutableArgs?:string[] |null
The executable parameters. Pass to executableName
Inherited from
CommonLinuxOptions.executableArgs
grade?
readonlyoptionalgrade?:"devel"|"stable"|null
The quality grade of the snap.
stable— suitable for all channels, includingstableandcandidate.devel— development snapshot; cannot be promoted tostableorcandidate.
Default
stable
hooks?
readonlyoptionalhooks?:string|null
Directory containing snap hooks, relative to
the build resources directory (build/).
Default
build/snap-hooks
layout?
readonlyoptionallayout?: {[key:string]:object; } |null
Snap layouts — bind-mount or symlink host paths
into the snap's namespace, making libraries or config at /usr, /var, /etc, etc.
accessible inside the confined environment.
mimeTypes?
readonlyoptionalmimeTypes?:string[] |null
The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.
Inherited from
plugs?
readonlyoptionalplugs?:PlugDescriptor| (string|PlugDescriptor)[] |null
Plugs (consumed interfaces) to declare
for the app entry point.
Defaults to ["desktop", "desktop-legacy", "home", "x11", "wayland", "unity7", "browser-support", "network", "gsettings", "audio-playback", "pulseaudio", "opengl"].
Use "default" in the list to keep the defaults and append extras:
["default", "camera"] adds camera to the standard set.
To configure plug attributes, use a descriptor object:
[
{ "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true } },
"another-simple-plug-name"
]
Note that the Snap Store reserves allow-sandbox (which keeps Chromium's internal sandbox) for
vetted publishers and rejects other uploads that request it; electron-builder warns when it is set.
publish?
optionalpublish?:Publish
Inherited from
slots?
readonlyoptionalslots?:SlotDescriptor| (string|SlotDescriptor)[] |null
Slots (provided interfaces) to declare for the app.
To expose an MPRIS player under the Chromium bus name (required for strict confinement):
[{ "mpris": { "name": "chromium" } }]
Chromium hard-codes
the bus name chromium, so the slot name must match for snapd to
allow it.
stagePackages?
readonlyoptionalstagePackages?:string[] |null
Ubuntu packages to stage alongside the app (equivalent to depends for deb).
Defaults to ["libnspr4", "libnss3", "libxss1", "libappindicator3-1", "libsecret-1-0"].
Use the "default" keyword to extend the default list:
["default", "my-extra-lib"] appends my-extra-lib to the defaults.
summary?
readonlyoptionalsummary?:string|null
A short summary of the snap (max 78 characters). Defaults to productName.
synopsis?
readonlyoptionalsynopsis?:string|null
The short description.
Inherited from
title?
readonlyoptionaltitle?:string|null
Display title for the snap (may contain uppercase letters and spaces).
Defaults to productName.
See snap format.
useTemplateApp?
readonlyoptionaluseTemplateApp?:boolean
Whether to use the pre-built Electron snap template for faster builds.
When true, electron-builder delegates snap assembly to the upstream Electron snap
template rather than running a full snapcraft build, significantly reducing build time.
Defaults to true when stagePackages is not customised.
Only applicable to x64 and armv7l builds.