Zenity freezes
Johnny Rosenberg
gurus.knugum at gmail.com
Mon Dec 31 16:44:37 UTC 2012
2012/12/31 Tony Arnold <tony.arnold at manchester.ac.uk>:
> 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.
That works for me too, but is not an option. At least not a convenient
one. I think it's convenient to add things to (several) different
files rather than adding them into the script. My solution, at least
for now, seems to be replacing Zenity with Yad. Yad seems to use
pretty much the same syntax, so in many cases I only need to replace
the word ”zenity” with the word ”yad”, with only minor adjustments.
But it's good to know that this works, it could be a clue for the
developers.
Johnny Rosenberg
More information about the ubuntu-users
mailing list