Debian Bug report logs -
#568923
not suitable for use in BROWSER
Reported by: Joey Hess <joeyh@debian.org>
Date: Mon, 8 Feb 2010 20:54:02 UTC
Severity: normal
Found in version w3m/0.5.2-2.1
Fixed in version w3m/0.5.3-1
Done: d+deb@vdr.jp
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Fumitoshi UKAI <ukai@debian.or.jp>:
Bug#568923; Package w3m.
(Mon, 08 Feb 2010 20:54:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Joey Hess <joeyh@debian.org>:
New Bug report received and forwarded. Copy sent to Fumitoshi UKAI <ukai@debian.or.jp>.
(Mon, 08 Feb 2010 20:54:05 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: w3m
Version: 0.5.2-2.1
Severity: normal
Setting BROWSER=w3m is sadly asking for trouble. When some X program
(such as xfce4-terminal) tries to use sensible-browser, it will run w3m,
and despite w3m having no terminal, w3m will exit nonzero, and so
sensible-browser assumes it succeeded, and does not go on to run
x-www-browser instead.
What does w3m really do when run like this?
Well, one possibility is that since TERM is not set, it fails. Except,
oops -- w3m prints an error and then exits successfully in this kind of
case:
joey@gnu:~>TERM= w3m; echo $?
Can't find termcap entry
0
joey@gnu:~>unset TERM
joey@gnu:~>w3m http://kite/; echo $?
TERM is not set
0
It should exit nonzero in both the cases above.
However, strace shows that when run by xfce4-terminal, w3m actually
dumps the page to stdout and exits, same as if it were run in a pipe.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages w3m depends on:
ii libc6 2.10.2-5 Embedded GNU C Library: Shared lib
ii libgc1c2 1:6.8-1.2 conservative garbage collector for
ii libgpm2 1.20.4-3.3 General Purpose Mouse - shared lib
ii libncurses5 5.7+20090803-2 shared libraries for terminal hand
ii libssl0.9.8 0.9.8k-8 SSL shared libraries
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages w3m recommends:
ii ca-certificates 20090814 Common CA certificates
Versions of packages w3m suggests:
ii man-db 2.5.6-5 on-line manual pager
ii menu 2.1.43 generates programs menu for all me
pn migemo <none> (no description available)
ii mime-support 3.48-1 MIME files 'mime.types' & 'mailcap
pn w3m-el <none> (no description available)
pn w3m-img <none> (no description available)
-- debconf-show failed
--
see shy jo
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Tatsuya Kinoshita <tats@debian.org>:
Bug#568923; Package w3m.
(Sat, 21 Aug 2010 15:30:06 GMT) (full text, mbox, link).
Acknowledgement sent
to d+deb@vdr.jp:
Extra info received and forwarded to list. Copy sent to Tatsuya Kinoshita <tats@debian.org>.
(Sat, 21 Aug 2010 15:30:06 GMT) (full text, mbox, link).
Message #10 received at 568923@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 568923 + help
thanks
Hi,
> Well, one possibility is that since TERM is not set, it fails. Except,
> oops -- w3m prints an error and then exits successfully in this kind of
> case:
>
> joey@gnu:~>TERM= w3m; echo $?
> Can't find termcap entry
> 0
> joey@gnu:~>unset TERM
> joey@gnu:~>w3m http://kite/; echo $?
> TERM is not set
> 0
>
> It should exit nonzero in both the cases above.
w3m in CVS HEAD exit nonzero if TERM is not set.
(in Japanese)
http://mi.med.tohoku.ac.jp/~satodai/w3m-dev/201008.month/4405.html
> Setting BROWSER=w3m is sadly asking for trouble. When some X program
> (such as xfce4-terminal) tries to use sensible-browser, it will run w3m,
> and despite w3m having no terminal, w3m will exit nonzero, and so
> sensible-browser assumes it succeeded, and does not go on to run
> x-www-browser instead.
>
> What does w3m really do when run like this?
> However, strace shows that when run by xfce4-terminal, w3m actually
> dumps the page to stdout and exits, same as if it were run in a pipe.
But w3m is not suitable for invoking from xfce4-terminal yet.
--
Regards,
dai
GPG Fingerprint = 0B29 D88E 42E6 B765 B8D8 EA50 7839 619D D439 668E
[signature.asc (application/pgp-signature, inline)]
Added tag(s) help.
Request was from d+deb@vdr.jp
to control@bugs.debian.org.
(Sat, 21 Aug 2010 15:30:07 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Tatsuya Kinoshita <tats@debian.org>:
Bug#568923; Package w3m.
(Wed, 23 Feb 2011 07:36:02 GMT) (full text, mbox, link).
Acknowledgement sent
to trentbuck@gmail.com:
Extra info received and forwarded to list. Copy sent to Tatsuya Kinoshita <tats@debian.org>.
(Wed, 23 Feb 2011 07:36:02 GMT) (full text, mbox, link).
Message #17 received at 568923@bugs.debian.org (full text, mbox, reply):
Joey Hess wrote:
> However, strace shows that when run by xfce4-terminal, w3m actually
> dumps the page to stdout and exits, same as if it were run in a pipe.
ssh -T has the desired properties:
$ ssh -T blood test -t 0; echo $?
1
$ ssh -T blood test -t 1; echo $?
1
$ ssh -T blood test -t 2; echo $?
1
$ ssh -T blood tput longname; echo $?
tput: No value for $TERM and no -T specified
2
Thus it can be used to test the behaviour of tty browsers:
$ ssh -T blood aptitude search --disable-columns "'-F%p %v'" ~i~Pwww-browser
elinks 0.12~pre5-2ubuntu1
links 2.2-1build1
links2 2.2-1build1
lynx-cur 2.8.8dev.2-1
netrik 1.16.1-1
w3m 0.5.2-2.1ubuntu1.1
Of all those, only netrik does what you seem to want -- exiting with a
non-zero exit status. links and links2 don't even exit, despite there
/dev/tty being inaccessible and /dev/stdin being at EOF!
$ ssh -T blood w3m http://example.net/ <&-; echo $?
Homepage
• Domains
• Numbers
• Protocols
• About IANA
Example Domains
As described in RFC 2606, we maintain a number of domains such as EXAMPLE.COM
and EXAMPLE.ORG for documentation purposes. These domains may be used as
illustrative examples in documents without prior coordination with us. They are
not available for registration.
Domains Protocols
About Root Zone [icann-logo]
Presentations .INT Number IANA is operated by the
Performance .ARPA Resources Internet Corporation for Assigned Names
Reports IDN Abuse and Numbers
Repository Information
Please direct general feedback regarding IANA to iana@iana.org.
0
$ ssh -T blood lynx http://example.net/ <&-; echo $?
Your Terminal type is unknown!
Enter a terminal type: [vt100]
TERMINAL TYPE IS SET TO vt100
HTTP request sent; waiting for response.
[?1l>0
$ ssh -T blood links http://example.net/ <&-; echo $?
+------------------------ Welcome -------------------------+ | | | Welcome to links! | | | | To display menu, press ESC or click on the top line in | | window. Select Help->Manual in menu for user's manual. | | | | [ OK ] | +----------------------------------------------------------+ Looking up host Making connectionRequest sent Looking up hostMaking connectionRequest sent IANA - Example domainsHomepage* Domains* Numbers* ProtocTransferringols* About IANAAs dEXAMmaybe uonwithAbouPresPerfrReports .ARPAAbuse Information Assigned Names and NumbersIDN RepositoryPlease direct general feedback regarding IANA to iana@iana.org.http://www.iana.org/
C-c C-c130
$ ssh -T blood elinks http://example.net/ <&-; echo $?
[1]Homepage
* [2]Domains
* [3]Numbers
* [4]Protocols
* [5]About IANA
Example Domains
As described in [6]RFC 2606, we maintain a number of domains such as
EXAMPLE.COM and EXAMPLE.ORG for documentation purposes. These domains may
be used as illustrative examples in documents without prior coordination
with us. They are not available for registration.
[11]Domains [16]Protocols
[7]About [12]Root Zone IANA is operated by the
[8]Presentations [13].INT [17]Number [19]Internet Corporation
[9]Performance [14].ARPA Resources for Assigned Names and
[10]Reports [15]IDN [18]Abuse Numbers
Repository Information
Please direct general feedback regarding IANA to [20]iana@iana.org.
References
Visible links
1. http://www.iana.org/
2. http://www.iana.org/domains/
3. http://www.iana.org/numbers/
4. http://www.iana.org/protocols/
5. http://www.iana.org/about/
6. http://www.iana.org/go/rfc2606
7. http://www.iana.org/about/
8. http://www.iana.org/about/presentations/
9. http://www.iana.org/about/performance/
10. http://www.iana.org/reports/
11. http://www.iana.org/domains/
12. http://www.iana.org/domains/root/
13. http://www.iana.org/domains/int/
14. http://www.iana.org/domains/arpa/
15. http://www.iana.org/domains/idn-tables/
16. http://www.iana.org/protocols/
17. http://www.iana.org/numbers/
18. http://www.iana.org/abuse/
19. http://www.icann.org/
20. mailto:iana@iana.org?subject=General%20website%20feedback
0
$ ssh -T blood links2 http://example.net/ <&-; echo $?
C-c C-c130
$ ssh -T blood netrik http://example.net/ <&-; echo $?
TERM environment variable not set.
1
$
Removed tag(s) help.
Request was from d+deb@vdr.jp
to control@bugs.debian.org.
(Fri, 11 Nov 2011 03:09:03 GMT) (full text, mbox, link).
Bug Marked as fixed in versions w3m/0.5.3-1.
Request was from d+deb@vdr.jp
to control@bugs.debian.org.
(Fri, 11 Nov 2011 03:09:03 GMT) (full text, mbox, link).
Reply sent
to d+deb@vdr.jp:
You have taken responsibility.
(Fri, 11 Nov 2011 03:09:06 GMT) (full text, mbox, link).
Notification sent
to Joey Hess <joeyh@debian.org>:
Bug acknowledged by developer.
(Fri, 11 Nov 2011 03:09:06 GMT) (full text, mbox, link).
Message #26 received at 568923-done@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 568923 - help
fixed 568923 0.5.3-1
thanks
2010-08-20 Ito Hiroyuki <ZXB01226@nifty.com>
* [w3m-dev 04402] Re: "normal" bugs from bugs.debian.org
* terms.c (reset_exit_with_value, reset_error_exit): added
(reset_exit): use reset_exit_with_value()
(ttymode_set, ttymode_reset, set_cc, getTCstr)
(sleep_till_anykey): use reset_error_exit() instead of reset_exit()
--
Regards,
dai
GPG Fingerprint = 0B29 D88E 42E6 B765 B8D8 EA50 7839 619D D439 668E
[signature.asc (application/pgp-signature, inline)]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 09 Dec 2011 07:34:14 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon Jun 5 03:09:46 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.