When using zenity as backend, the following code fails to create a notification and hangs with the error message Could not parse command from stdin.
using Alert
alert("test")
The issue is that the --listen command expects a specific structure for the input. In the man page for older zenity version (e.g. 3.44.01), the structure is described clearly:
--listen
Listen for commands on stdin. Commands include 'message', 'tooltip', 'icon',
and 'visible' separated by a colon. For example, 'message: Hello world',
'visible: false', or 'icon: /path/to/icon'. The icon command also accepts the
four stock icon: 'error', 'info', 'question', and 'warning'
It is the same format used in the up-to-date example on Gnome's website2.
The right way would be to use the --text option with the message right after.
When using
zenityas backend, the following code fails to create a notification and hangs with the error messageCould not parse command from stdin.The issue is that the
--listencommand expects a specific structure for the input. In the man page for olderzenityversion (e.g. 3.44.01), the structure is described clearly:It is the same format used in the up-to-date example on Gnome's website2.
The right way would be to use the
--textoption with the message right after.Footnotes
https://manpages.debian.org/bookworm/zenity/zenity.1.en.html ↩
https://help.gnome.org/users/zenity/stable/notification.html.en ↩