Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


echo "message:hi" | zenity --notification --listen

I can click the bubble and it disappears. The zenity program keeps running until I Ctrl-C. Is there a way to "catch" the click and make some program run if the bubble is clicked before it goes away?

share|improve this question
up vote 3 down vote accepted

The request to perform an action when you click on the Zenity notification icon is a long standing request.

According to the associated bug-report, it was proposed to perform this action when you pass a parameter like --cmd= - an example use-case was to invoke the terminal window when the notification was clicked i.e. by passing the parameter --cmd=gnome-terminal

However, this is still outstanding, awaiting for a budding coder to take this forward.

share|improve this answer
Note: there's a fork at that supposedly deals with some of the zenity bug reports – unhammer Jan 12 '13 at 20:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.