Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.


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

1 Answer 1

up vote 2 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 code.google.com/p/yad 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.