PDA

View Full Version : [SOLVED] A question on zenity and input-output redirection



skotos
December 11th, 2008, 05:08 PM
OK, HTML sanitazation destroys the message so I will split it in parts: First, I would like to run a script using the following zenity syntax:
zenity --notification --listenbut I cannot find any sample nor documentation on how to get zenity 2.22.1 reading the information I am going to provide.

skotos
December 11th, 2008, 05:18 PM
I am thinking at something like this
exec 3>myfile.txt; zenity --notification --listen < & 3

skotos
December 11th, 2008, 05:22 PM
And in another script:
echo Starting > myfile.txt; echo Ending > myfile.txt

skotos
December 11th, 2008, 05:24 PM
Any idea on how to update the notification tooltip or on where to find further info on the zenity --notification --listen tool?

mssever
December 11th, 2008, 05:45 PM
And in another script:
echo Starting > myfile.txt; echo Ending > myfile.txt
The > overwrites the file. I think you mean >>.

Any idea on how to update the notification tooltip or on where to find further info on the zenity --notification --listen tool?If it's possible to switch language, this task is much easier with Python's subprocess module.

Getting input into zenity is rather easy on the command line, but as you say,zenity's docs are incomplete.
zenity --notification --listen
--text=HI
could not parse command from stdin
--text="Hi"
could not parse command from stdin
text=hi
could not parse command from stdin
hi
could not parse command from stdin

mssever
December 11th, 2008, 05:52 PM
Googling for
zenity "--listen"turned up this post (http://ubuntuforums.org/showpost.php?p=5872404&postcount=2), which solves your problem.

skotos
December 11th, 2008, 06:05 PM
this post (http://ubuntuforums.org/showpost.php?p=5872404&postcount=2), which solves your problem.

Thank you!