d/r/development: document new desktop related environment variables added in snapd 2.77#354
Conversation
…dded in snapd 2.77 Update the documentation to mention new environment variables added in snapd 2.77: - SNAP_APP_NAME - SNAP_APP_COMMON_ID - SNAP_APP_DESKTOP_FILE - SNAP_APP_BUS_NAME Signed-off-by: Maciek Borzecki <maciej.borzecki@canonical.com>
olivercalder
left a comment
There was a problem hiding this comment.
Thanks! Some nitpicks about the examples
|
|
||
| Only set when running an application command. | ||
|
|
||
| Typical value: `cmd` |
There was a problem hiding this comment.
Maybe something which looks more clearly like an example name?
| Typical value: `cmd` | |
| Typical value: `my-app-name` |
|
|
||
| Only set when running an application that has an associated desktop file on disk. | ||
|
|
||
| Typical value: `/var/lib/snapd/desktop/applications/org.example.Foo.desktop` |
There was a problem hiding this comment.
Could be nice to have an example for a snap without a commonID-shaped desktop file, e.g.
| Typical value: `/var/lib/snapd/desktop/applications/org.example.Foo.desktop` | |
| Typical value: `/var/lib/snapd/desktop/applications/org.example.Foo.desktop` | |
| Typical value: `/var/lib/snapd/desktop/applications/my-snap-name_my-app-name.desktop` |
FWIW not a single installed snap on my system has a desktop file which uses a common ID, they're all snapname_appname.desktop.
There was a problem hiding this comment.
ah, right good point
|
|
||
| Only set when running an application that defines a `bus-name`. | ||
|
|
||
| Typical value: `org.example.Foo` |
There was a problem hiding this comment.
Is this a typical dbus bus name?
There was a problem hiding this comment.
could be anything IIRC, but most follow the reverse domain naming pattern:
$ busctl --user --no-pager
...
:1.92 15954 vivaldi-bin maciek :1.92 user@1020.service - -
:1.93 15954 vivaldi-bin maciek :1.93 user@1020.service - -
ca.desrt.dconf 13319 dconf-service maciek :1.18 user@1020.service - -
ca.desrt.dconf-editor - - - (activatable) - - -
com.belmoussaoui.Authenticator.SearchProvider - - - (activatable) - - -
com.canonical.Unity 13219 gnome-shell maciek :1.8 user@1020.service - -
com.feralinteractive.GameMode - - - (activatable) - - -
com.github.tchx84.Flatseal - - - (activatable) - - -
com.mitchellh.ghostty 29839 ghostty maciek :1.133 user@1020.service - -
io.github.celluloid_player.Celluloid - - - (activatable) - - -
io.snapcraft.Launcher - - - (activatable) - - -
io.snapcraft.SessionAgent - - - (activatable) - - -
io.snapcraft.Settings - - - (activatable) - - -
org.a11y.Bus 13298 at-spi-bus-laun maciek :1.12 user@1020.service - -
org.bluez.obex 17862 obexd maciek :1.104 user@1020.service - -
org.fedoraproject.Config.Printing - - - (activatable) - - -
org.ffado.Control - - - (activatable) - - -
org.flatpak.Authenticator.Oci - - - (activatable) - - -
org.freedesktop.ColorHelper - - - (activatable) - - -
…ables added in snapd 2.77
…ables added in snapd 2.77
olivercalder
left a comment
There was a problem hiding this comment.
LGTM, but curious why the "Only set when ..." information about SNAP_APP_DESKTOP_FILE was removed.
|
|
||
| The absolute path to the application's installed desktop file. | ||
|
|
||
| Only set when running an application that has an associated desktop file on disk. The actual value depends on whether `common-id` is defined, or whether `desktop-file-ids` attribute is added to the `desktop` interface plug, and presence of matching desktop files. |
There was a problem hiding this comment.
Why remove this comment? I think this is useful information, and matches the others which have "Only set when ..." comments.
There was a problem hiding this comment.
I'm going a bit back and forth with the level of detail on when either of the values is set.
…ables added in snapd 2.77
Update the documentation to mention new environment variables added in snapd 2.77:
See canonical/snapd#16016