Zenity freezes

Tony Arnold tony.arnold at manchester.ac.uk
Mon Dec 31 13:02:22 UTC 2012


Johnny,

On 31/12/12 02:25, Johnny Rosenberg wrote:
> In a terminal (things in <> are instructions, don't type those…):
> $ cat > Musicians
> FALSE
> First Name
> FALSE
> Second Name
> FALSE
> Third Name
> <Press Ctrl+d>
> $ zenity --list --title "Select musicians" --text="Some text"
> --column="Select" --column="Musician" --checklist --separator="\n"
> --height=480 --width=370 < Musicians
> 
> The dialogue opens. Now hit OK or Cancel.
> 
> Now, sometimes this works, but most of the time the dialogue freeze.
> The terminal shows the following:
> 
> (zenity:3629): GLib-WARNING **:
> /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting
> flags for FD: Bad file descriptor (9)
> 
> 
> (zenity:3629): GLib-WARNING **:
> /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting
> flags for FD: Bad file descriptor (9)
> 
> 
> (zenity:3629): GLib-WARNING **:
> /build/buildd/glib2.0-2.32.3/./glib/giounix.c:411Error while getting
> flags for FD: Bad file descriptor (9)
> 
> and so on.
> 
> Ctrl+c in the terminal cancels the dialogue.
> 
> So, what is this? User error or Zenity error? If user error, what did
> I do wrong? This worked in Ubuntu 10.10, at least better than in
> Ubuntu 12.04. I think I remember that it freeze in Ubuntu 10.10 too,
> but not almost every time, like it does in Ubuntu 12.04.

I use a similar zenity command in a script I've written but I don't get
this error. The difference is I specify the column contents as
parameters to the zenity command instead of reading them from stdin.
Here is my command.

competition=$(zenity --list --title="Which competition?" \
   --radiolist \
   --height=300\
   --column Select \
   --column Competition \
     TRUE  "Compex 1" \
     FALSE "Compex 2" \
     FALSE "Compex 3" \
     FALSE "Compex 4" \
     FALSE "Compex Final" \
     FALSE "Annual Exhibition" \
     FALSE "President's Challenge")


Don't know if this is an option for you, but it might help.

Regards,
Tony.
-- 
Tony Arnold,                        Tel: +44 (0) 161 275 6093
Head of IT Security,                Fax: +44 (0) 705 344 3082
University of Manchester,           Mob: +44 (0) 773 330 0039
Manchester M13 9PL.                 Email: tony.arnold at manchester.ac.uk




More information about the ubuntu-users mailing list