The Zenity Remote Part

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.

2018-12-03%2012-22-55%20%E7%9A%84%E8%9E%A2%E5%B9%95%E6%93%B7%E5%9C%96

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

1 Like

Dear @admins, I forgot to set this forum topic as wiki and it’s now locked, can you do that for me?

Thanks in advance!