Bug 238924 - Zenity says "This option is not available."
Zenity says "This option is not available."
Product: Fedora
Classification: Fedora
Component: zenity (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-05-03 17:08 EDT by Jasper O. Hartline
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-04 09:27:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace of Zenity (12.04 KB, text/plain)
2007-05-03 20:04 EDT, Jasper O. Hartline
no flags Details

  None (edit)
Description Jasper O. Hartline 2007-05-03 17:08:56 EDT
Description of problem:
Using this string in a shell script:

RETURN=$(/usr/sbin/chroot $SYSDIR /usr/bin/zenity --title "Firewall
Configuration" --list --radiolist TRUE Enabled FALSE Disabled --column "Item"
--column "Option")

Zenity returns saying "This option is not available. See --help for all possible

Version-Release number of selected component (if applicable):

How reproducible:
Use the Zenity version listed above, in a script using chroot and a directory,
where Zenity is installed.

Steps to Reproduce:
Actual results:
Zenity says this option isn't available.

Expected results:
Standard behavior, readiolist pops up, etc.

Additional info:
No additional information at this time.
Comment 1 Matthias Clasen 2007-05-03 18:54:30 EDT
It doesn't say that here, but instead pops up a dialog containing just the radio
column. It works better if you add another --column
Comment 2 Jasper O. Hartline 2007-05-03 20:01:39 EDT
Well, if you could tell me why it is behaving like this, I would appreciate it..
I think I've been mixing and matching different quotes, with no quotes, I'm
really out of ideas, take a look:

[root@localhost ~]# perl -e '$RETURN = `/usr/bin/zenity --text \"Firewall
Configuration\" --list --column \"Item\" --column \"Option\" --checklist TRUE
Enabled FALSE Disabled`'
[root@localhost ~]# rpm -q zenity
[root@localhost ~]# perl -e '$RETURN = `/usr/sbin/chroot
/tmp/kadischi.q6brJG/system /usr/bin/zenity --text \"Firewall Configuration\"
--list --column \"Item\" --column \"Option\" --checklist TRUE Enabled FALSE
This option is not available. Please see --help for all possible usages.
[root@localhost ~]# /usr/sbin/chroot /tmp/kadischi.q6brJG/system /bin/rpm -q zenity
[root@localhost ~]#

The first invokation of zenity, which is a Fedora Core 6 zenity package, brings
up the expected window, with the right options, the second one does not.
strace output will be provided which may give you more insight, as I have
already looked at it.
Comment 3 Jasper O. Hartline 2007-05-03 20:04:00 EDT
Created attachment 154090 [details]
strace of Zenity

Attached strace output:

strace perl -e '$RETURN = `/usr/sbin/chroot /tmp/kadischi.q6brJG/system
/usr/bin/zenity --text \"Firewall Configuration\" --list --column \"Item\"
--column \"Option\" --checklist TRUE Enabled FALSE Disabled`' >/tmp/strace.log
Comment 4 Matthias Clasen 2007-05-03 20:08:01 EDT
no idea, in any case, this is not a zenity problem, but some shell/perl quoting
Comment 5 Jasper O. Hartline 2007-05-03 23:09:22 EDT
I'm not seeing how the addition of "/usr/sbin/chroot /tmp/directory/" makes it
fail, leaving this to be a shell/perl quoting problem.

It also fails with the same "This option is not available" using this in a BASH

RETURN=$(/usr/sbin/chroot $SYSDIR /usr/bin/zenity --title "Firewall
Configuration" --list  --radiolist TRUE Enabled FALSE Disabled --column "Item"
--column "Option")

If I run that directly in the shell without /usr/sbin/chroot $SYSDIR, it works
fine. That doesn't sound to me like a shell/perl quoting problem exactly.
Comment 6 Matthias Clasen 2007-05-03 23:30:51 EDT
RETURN=$(/usr/sbin/chroot / /usr/bin/zenity --text "Firewall Configuration"
--list --radiolist E TRUE D FALSE --column "Item" --column "Option")

works fine here. You will have to debug this yourself, I'm afraid. I'd propose
to first see if SYSDIR=/ works, and then proceed to look for problems inside
your SYSDIR.
Comment 7 Jasper O. Hartline 2007-05-04 09:27:56 EDT
Ok. Using strace I have located the problem, bringing it out of the Perl script
and running it directly from the fake rootfs. The missing /tmp/.X11-unix and
sockets associated with it, along with the hosts's ACL regarding connections to
the X server were causing Zenity to return the option not available message.

This could be considered a red herring error message, and I've since taken this
issue up on Gnome's bugzilla.

One thing however, is after the issues above are rectified for using Zenity in a
seperate rootfs, under chroot(1), if no fonts are installed, Zenity will fail
also, stating this is the case.

Perhaps the Zenity package should have a Requires on a standard font package.
Thanks Matthias.

Note You need to log in before you can comment on or make changes to this bug.