GNOME Bugzilla – Bug 525596
using --listen with --notification, icon command does not work when piped
Last modified: 2014-10-21 09:26:55 UTC
Please describe the problem: echo -e "icon:info" | zenity --notification --listen WORKS, but the icon in the notification area disappears echo -e "icon:mycustom.png" | zenity --notification --listen DOES NOT work Steps to reproduce: 1. See description. Actual results: Expected results: echo -e "icon:homer.png" | zenity --notification --listen (zenity:13465): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_file_at_scale: assertion `width > 0 || width == -1' failed (zenity:13465): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_file_at_scale: assertion `width > 0 || width == -1' failed Does this happen every time? yes Other information:
I see both these problems. --listen is a little funny because it exits when the input pipe is closed. So, using it from the shell is kind of a pain IME. You can make a notification pop up for a given length of time like this: (echo icon:info; sleep 5) | zenity --notification --listen The second problem I see even if the icon: line points to an existing file.
Created attachment 154839 [details] [review] Don't quit zenity when the input stream is closed From fc381b5938f7235401286d4821f03d2b05d4876a Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort <pochu27@gmail.com> Date: Sat, 27 Feb 2010 15:32:23 +0100 Subject: [PATCH] Don't quit zenity when the input stream is closed When using --listen for a notification, zenity quits when the stream ends. This makes it impossible to read commands from a pipe as in `echo icon:info | zenity --notification --listen'.
You are not using it properly, this is how it works: # open an asynchronous pipe exec 3> >(zenity --notification --listen --text="starting...") # echo stuff there as long as you want echo "tooltip:What's up?" >&3 sleep 10 echo "tooltip:Nothin, I see." >&3 # close it when done exec 3>&-
ping? can I commit my patch?
Hello, So what's the status of this bug? The help page is showing the following: cat <<EOH| zenity --notification --listen message: this is the message text EOH Without the patch, the call is NOT blocking, with the patch it becomes blocking. What is the expected behavior here?
Sorry the delay, I will take a look on this until next weekend.
Sorry the delay, I moved to another country, and had to stabilize my life before return work on gnome. Patch is applied on master https://git.gnome.org/browse/zenity/commit/?id=fc76e0c19be22d47cf6044ca591f0e01010a1a80