$ notify-send "This is some text"
This will display a text balloon "This is some text".
$zenity --info --text "This is some text"
The problem appears when we want to display the output of a command.
For this, I used a python script. Here's the source code:
If you wish to use a compound command, then you will need to use quotes.
#!/usr/bin/env python import os import sys import pynotify pynotify.init("Output comand") arg=sys.argv print arg s = os.popen(arg).read() n = pynotify.Notification("Output",s) n.show()
For example, we use the command "ls-a 'as follows:
This is just a small example, you can create more complex applications.
$python testpy.py "ls -a"