4

If I use the example usage command for notifications from the Zenity documentation site:

zenity --notification\
--window-icon="info" \
--text="There are system updates necessary!"

I get a notification with a button at the bottom saying "Do Default Action". Clicking the button removes the notification.

How do I change that default and make it display something else? Or remove the button entirely? And how is the default action to be run? man zenity, zenity --help-notification, and the website above seem to be entirely silent on the matter.

I'm on Xubuntu 14.04, using Zenity 3.8.0.

Matt_M
  • 63
  • 1
  • 7

1 Answers1

2

Have you tried using notify-send?

$ notify-send -t 100 "Alert" "There are system updates Necessary"
acesmndr
  • 144
  • 3
  • That certainly works (as does "zenity --notification --listen" plus piping a message to stdin), but I'm actually trying to write a Haskell wrapper for Zenity as a hobby/practice project, so I want to be able to understand all of Zenity's features if possible. The button to click to acknowledge the message is definitely a potentially useful feature -- if I could work out how to change the message! – Matt_M Mar 25 '15 at 07:40
  • 1
    Actually it's a feature of the Distro and not of Zenity. I can confirm as it the button is seen in Xubuntu 14.04 but not in Elementary OS Freya which is based on 14.04 both with Zenity 3.8.0 Sorry for the late reply! :) – acesmndr May 11 '15 at 13:21
  • OK, interesting information. I'll see how it goes when I upgrade Xubuntu. – Matt_M May 12 '15 at 14:13
  • Beware: apparently the timeout does not work with notify-send (moreover, it is expressed in milliseconds). https://askubuntu.com/questions/110969/notify-send-ignores-timeout – Raúl Salinas-Monteagudo May 31 '17 at 15:33