it appears zenity is broken in 12.04. I launched precise in virtualbox and when i use the code of the first window in terminal and confirm the selection with OK this happens, ad infinitum:
Code:
(zenity:2561): GLib-WARNING **: /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting flags for FD: Bad file descriptor (9)
(zenity:2561): GLib-WARNING **: /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting flags for FD: Bad file descriptor (9)
...
lame :/
you can use yad instead, it's a fork of zenity so it works pretty much the same
http://www.webupd8.org/2010/12/yad-z...s-display.html
Code:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install yad
in the script:
Code:
r=$( yad --list --title="Address book" --text="Select recipient" --column=name --column=address --separator='' --width=400 --height=300 --print-column=2 <<< "$recipients" )
s=$( yad --entry --title="Subject" --text="Enter subject" )
as you can see it's almost the same code.
I added width and height because at least in my case the default size was too small. You can configure window sizes to suit your needs.
Bookmarks