On Mon, 24 Oct 2011 21:04:27 +0200 Francesco Poli wrote: > On Mon, 24 Oct 2011 00:16:18 -0400 Joe Nahmias wrote: [...] > > joe@wakko:~$ sudo /usr/bin/querybts 644254 < /dev/tty > > [sudo] password for joe: > > No protocol specified > > /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: > > could not open display > > warnings.warn(str(e), _gtk.Warning) > > Retrieving report #644254 from Debian bug tracking system... > > What do you want to do now? [N|x|o|r|b|e|q|?]? q > > Exiting. > > When invoked from sudo, querybts seems to first try the gtk2 interface > and then to fall back to the text interface.
It's not like that, see later... > > This puzzles me a bit: I don't know why I don't see the same behavior. > Maybe you have some additional packages (suggested by reportbug). > What's the output of the following command on your system? > > dpkg -l | egrep 'python-urw|python-gtk|python-vte' > > But, more importantly, I wonder why you don't see the same behavior when > querybts is invoked by apt-listbugs... > > I'll try to reproduce the issue in a sid chroot (tonight, hopefully). OK, I managed to recreate a similar environment inside a sid chroot. After installing apt-listbugs, reportbug, and python-vte, I actually see that querybts (with reportbug default configuration files) first check whether a display may be opened, and then, after failing to open a display, goes on and uses the default text interface. I see this behavior when invoking querybts directly from my shell prompt, as in /usr/bin/querybts 644254 < /dev/tty This is exactly what you see, if I understand correctly. However, I see the same exact behavior, when querybts is invoked by apt-listbugs: serious bugs of im-config (-> 0.4) <unfixed> #644254 - im-config: problems in IM Module settings Summary: im-config(1 bug) Are you sure you want to install/upgrade the above packages? [Y/n/?/...] 644254 No protocol specified /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display warnings.warn(str(e), _gtk.Warning) Retrieving report #644254 from Debian bug tracking system... What do you want to do now? [N|x|o|r|b|e|q|?]? q Exiting. Are you sure you want to install/upgrade the above packages? [Y/n/?/...] Hence, apart from the error message that it spits out, it seems that apt-listbugs is able to go on and show me the bug report (in a text UI). I don't know why you get a different outcome... [...] > I am tempted to add the "-u text" option to the querybts invocation. I've just tried this modification. It *can* be useful, just in case some user has "ui gtk2" in /etc/reportbug.conf, which would cause the querybts invoked by apt-listbugs to unconditionally attempt to use the graphical interface (not a good idea, since apt-listbugs must be able to work without X). However, it does *not* remove the warning you see. The reason is that the warning is generated by python-gtk2, when this module is *imported* by querybts, and hence well before command line options or configuration files are parsed (see querybts source code, that I have started looking at...). I still don't understand why querybts fails to use the text interface for you, but anyway, the actual bug is in python-gtk2. And it has already been reported. Multiple times! See bug #533824 and its merged friends. Unfortunately, it seems that the issue is still unfixed... :-( In summary: (A) I will probably add the "-u text" option to the querybts invocation, but this won't solve your issue (B) we have to understand why, in your case, querybts does not use the text interface, when invoked by apt-listbugs (C) after that, this bug report will be probably better reassigned to python-gtk2 and merged with #533824 Please help me with (B). -- http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt New GnuPG key, see the transition document! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
pgpDcrOxO3197.pgp
Description: PGP signature