Inform users with custom dialogs

This is a stub, feel free to complete or improve it.

It is sometimes useful to include a custom dialog in your snap:

The following are some ways to implement these, according to the type of application you’re snapping.

Gtk

Zenity

If you’re using gnome-platform content sharing snap, merge the following part definition to your snapcraft yaml:

parts:
  # Integrate custom dialogs in your snap - doc - snapcraft.io
  # https://forum.snapcraft.io/t/integrate-custom-dialogs-in-your-snap/10825
  zenity:
    plugin: nil
    stage-packages:
      - zenity
    prime:
      - usr/bin/zenity
      - usr/share/zenity/*

otherwise:

parts:
  # Integrate custom dialogs in your snap - doc - snapcraft.io
  # https://forum.snapcraft.io/t/integrate-custom-dialogs-in-your-snap/10825
  zenity:
    plugin: nil
    stage-packages:
      - zenity

next adding the following layout definition:

layout:
  # Fix resource relocation problem of zenity part
  /usr/share/zenity:
    symlink: $SNAP/usr/share/zenity

Now you should be able to call zenity after the effect of the desktop-launch launcher. Also check out The Zenity integration stage snap for an alternative.

YAD(Yet Another Dialog)

T.B.A.

Qt

Kdialog

T.B.A.

Qarma

Qarma is a dialog implementation that is a Qt clone of Zenity. Unlike Kdialog, Qarma does not depend on KDE libraries.

Screenshot_20230618_145146

To integrate Qarma merge the following part definition:

parts:
  qarma-integration:
    plugin: nil
    stage-snaps:
      - qarma/18
    stage:
      - usr/bin/qarma

Replace 18 to 16 for snaps targeting Ubuntu Core 16(coming soon), refer qarma --help for instructions on using Qarma.

Command-line application

Dialog

Refer The dialog Snapcraft part: Support presenting TUI dialogs to the users for more info.

Whiptail

T.B.A.

1 Like

bonsoir, je suis nouveau même débutant j’utilise manjaro et j’ai installer snap mais quand j’installe des logiciel il y’a un problème incompatibilité entre le binaire snapd

Hello, for issues regarding the usage of specific a snap app please file a new topic at the snap topic category.