For snaps that use bases, check out The Zenity integration stage snap
This remote part features a build of the Zenity dialog program, for depending part to display a dialog like snap deprecation, etc.
How to use
Merge the following content to your snapcraft.yaml:
parts:
zenity:
# This part is needed until LP#1766878 is fixed
#
# Bug #1766878 “$SNAPCRAFT_PROJECT_NAME used in a remote part expands to wrong value” : Bugs : Snapcraft
# https://bugs.launchpad.net/snapcraft/+bug/1766878
configflags:
- --datarootdir=/snap/$SNAPCRAFT_PROJECT_NAME/current/share
- --disable-libnotify
- --disable-webkitgtk
organize:
snap/$SNAPCRAFT_PROJECT_NAME/current: /
Make sure you have also adopted the desktop-gtk3
or desktop-gnome-platform
remote part as Zenity depends on Gtk3.
Now you can run the desktop-launch zenity
(or $SNAP/bin/desktop-launch $SNAP/bin/zenity
in classic confinement) command in your launcher etc.
What’s working
- I18N
--info
--width
What’s not working
Refer the issue tracker for known issues: Issues · Lin-Buo-Ren/zenity-part
The implementation
Lin-Buo-Ren/zenity-part: The zenity
Remote Part: Display a simple dialog for your snap
Credits
This remote part is based on Olivier Tilloy’s recipe at Zenity dialogs in a snap - snapcraft - snapcraft.io
Reference
- For generic remote part usage refer: Remote (reusable) parts
- The Pango Markup Language