[HN Gopher] W3M Rocks
___________________________________________________________________
W3M Rocks
Author : marttt
Score : 178 points
Date : 2022-04-10 09:14 UTC (13 hours ago)
(HTM) web link (w3m.rocks)
(TXT) w3m dump (w3m.rocks)
| rosndo wrote:
| Worth mentioning that both w3m and lynx are horribly insecure.
| Although I guess it's very unlikely that anyone would actually
| bother to exploit such niche software.
| detaro wrote:
| Are they, despite not having most of the attack surface other
| browsers have (due to not supporting a lot of features)?
| rosndo wrote:
| Yes. The problem is that the features which they do support
| (which are still plentiful) are not particularly well
| implemented.
|
| Parsing HTML is difficult.
| antiframe wrote:
| Do you know of any current vulnerabilities in w3m? The last
| one I saw was in 2010 and fixed. Is it just not studied
| enough and there could be many undiscovered
| vulnerabilities? Beings up an interesting question of how
| to evaluate unknown vulnerabilities to determine if
| something is horribly insecure.
| rosndo wrote:
| It's not studied because nobody cares about w3m or Lynx.
| I'm just making these statements based on my own
| experience with fuzzing both a few years ago.
| rkta wrote:
| > nobody cares about w3m or Lynx
|
| I'd say, this is a security feature - even if the code is
| not the most secure.
|
| Out of interest, did you report your findings from
| fuzzing? Did things got fixed?
| tannhaeuser wrote:
| Not _that_ difficult if still laborious when following the
| construction of IETF HTML and W3C HTML 4.x as an SGML
| vocabulary _ab initio_ which already covers the vast
| majority of what people coming from XML have problems
| understanding, such as tag inference eg automatically
| ending span-level markup on block-level content. Plus some
| irregularities introduced with URLs, and with CSS and
| JavaScript to prevent those from being displayed as content
| in old browsers. Then add some more oddities introduced
| with WHATWG HTML 5.1+ arguably by accident and due to
| ignorance and lack of a formal grammar.
| Seirdy wrote:
| They both parse untrusted content content without any
| sandboxing.
|
| I typically send content through rdrview[0] before piping
| through w3m-sandbox[1], which should be pretty safe. I also
| only browse one site per w3m instance.
|
| [0]: https://github.com/eafer/rdrview
|
| [1]: https://git.sr.ht/~seirdy/bwrap-
| scripts/tree/trunk/item/w3m-...
| every wrote:
| I have the ability to pop into w3m from lynx[0] to view tables
| when necessary. I also have the option to call the x-www-browser
| script from lynx for the full graphical/js/css treatment, such as
| posting this comment from my account. But most of the time, lynx
| is more than adequate for my modest needs...
|
| [0] https://lynx.invisible-island.net/
| unfocussed_mike wrote:
| > Conserve eyesight
|
| Well that sounds scientific.
|
| (Never used w3m but links is a useful browser)
| ramesh31 wrote:
| What I really want is something inbetween this and a full fledged
| browser. Something that will basically allow me to browse the web
| in Reader mode, with support for images and native video, but
| without any JS involved.
| amelius wrote:
| I want a graphics terminal (as opposed to a text terminal) and
| a browser that opens in that terminal. The terminal should not
| run a windowing system. But the terminal itself should be able
| to run inside a windowing system.
| mikojan wrote:
| Uh you can just disable JavaScript in Firefox' about:config
| marginalia_nu wrote:
| Not on mobile. They've removed that for some reason on the
| lines of "but why would you use that?"
|
| Another casualty in the war on user agency.
| Nitrolo wrote:
| You could use uBlock Origin and disable javascript by
| default, it's availavle on mobile. When necessary you can
| also reenable it for specific sites, works pretty well for
| me.
|
| Also neat: you can disable media elements over a certain
| size (default is 50kb I think), which is a godsend if like
| me you have limited mobile data.
| moonchild wrote:
| netsurf?
| calvinmorrison wrote:
| I say just run firefox with NoScript for an easier medium...
| Add on "I don't care about cookies" and you're off to the
| races.
| eadmund wrote:
| uMatrix on Firefox gets one pretty close to that ideal, and
| makes it easy enough to enable JavaScript (and similar stuff)
| selectively until webapps and broken-by-design websites work.
|
| I strongly recommend it to the technically-inclined.
| Alterlife wrote:
| I'd recomend qutebrowser. It's not exactly what you're looking
| for out of the box, but it is very customisable. There's a
| learning curve but once you're used to it, no need to ever
| reach out for the mouse.
| calgoo wrote:
| I have been thinking of using a full headless chrome or firefox
| (so all pages work) and then share that with a commandline /
| lite browser. So we render and then re-render the page. The
| browser would run in a remote computer somewhere and the lite
| browser connects there. So a chrome/firefox proxy basically .
| Aeolun wrote:
| I'm fairly certain I've read about someone doing this exact
| thing before.
| HenrikB wrote:
| https://www.brow.sh/
| jefftk wrote:
| https://mightyapp.com is the first half of this
| whiplash451 wrote:
| I like this idea. How do you know what to render, though? Do
| you simply copy-paste the page source (but then what's the
| point?) or do you filter the source (but then how do you know
| what to filter out?)
| readingnews wrote:
| Does anyone have a chart/rundown of why we should choose
| links/lynx/w3m?
|
| The old main page calls links / lynx "neighbors"...
|
| http://w3m.sourceforge.net/
|
| I use links (gentoo user here), but I do not really see a huge
| difference between the three.
| zamadatix wrote:
| Some versions and forks of links have JS support which can
| differentiate it.
|
| Lynx and W3M are extremely similar, W3M was Japanese and in the
| 90s had much better support for the language. Lynx has unicode
| now but I'm not sure if it's fully on par in Japanese text
| rendering or not now.
|
| I'll also throw browsh in as another sub-category, it uses a
| headless instance of Firefox (packaged separately allowing
| independent updates) in the backend for full web support but
| presents the page in text-mode.
| gjvc wrote:
| there is no "we", just the decision of each person.
| zamadatix wrote:
| There is a we! It's all of us here now, the audience and/or
| potential users. We may not all make the same decision in the
| end but it'd be exceedingly odd if none of us were expected
| to have a shared reason backing our choice. You still have a
| valid question if you ask just for "I" but you'll end up with
| a thread about your specific case not a thread about the
| target users for each.
| gjvc wrote:
| not one any individual can accurately represent to any
| reasonable degree of confidence
| zamadatix wrote:
| But no one individual need represent the group, in fact
| the group need not be represented at all. The question
| posed is why we should choose, not why we must choose for
| everyone and announce the choice here. E.g. we should
| choose links over lynx/w3m if JS support is a hard
| requirement. That doesn't mean we all have JS support as
| a hard requirement or should all agree on the a single
| choice.
| gjvc wrote:
| i think you need to reread this thread
| rkta wrote:
| I don't know if using your own keymap in a howto is a great
| idea... I'd stick with the defaults or just name the commands.
|
| And yes, w3m rocks.
| tjoff wrote:
| I thoroughly agree, although... I think one of the main reasons
| for why I'm not using w3m more is because the keybindings feel
| so alien to me.
|
| Might try his to give w3m another shot.
| rkta wrote:
| Yes, the defaults are a bit strange. Might be a little late
| to change them now.
|
| IMHO, the most important thing to improve the user experience
| is to enable link numbers. With link numbers enabled you
| can[0] jump to a link by typing the number and then
| LINK_BEGIN (default '[').
|
| [0]: Technically you can do this without enabling link
| numbers, but you need count the links yourself.
| marttt wrote:
| Something like Plan 9's Mothra browser for the Unix console
| would be great. Support for images, mousing, a small command
| language and good shell integration.
|
| I like and use w3m a lot (I found the link and posted it here
| :), but maybe it already has a little too many settings to mess
| with. Then again, the lynx browser has more than 100, so YMMV.
|
| In this light, Mothra is refreshingly simple:
| http://man.cat-v.org/plan_9_2nd_ed/1/mothra
| rkta wrote:
| It has a little too many settings/features for my taste.
| Unfortunately removing things doesn't attract user - adding
| things does.
|
| I never used mothra, but heard a lot of good things about the
| plan 9 tools. They got the advantage, that they could start
| afresh. I'm curious how much work it would be to port it to a
| *nix system.
| Rediscover wrote:
| Emacs-w3m is tied with lynx as my favorite browser (with telnet
| and wget both in second place).
|
| Using emacspeak with it allows me to keep my eyes on the lab
| table (in case something goes exothermic too quickly) while still
| having the ability to pull up references. Same about reading
| [hearing] HN while in sketchy areas.
|
| The other post about invoking w3m from lynx is worth
| investigating if You are not familiar with such. Look for
| "EXTERNAL" in your .lynxrc. I especially like having it "git
| clone" the page or link I'm on. Reality is that I heavily abuse
| the EXTERNAL stuff.
|
| I've been noodling about the implementation of adding
| functionality to w3m and lynx so there is a separate fetch-page
| func but report a different User-Agent header (eg, "Mozilla").
| I've encountered many pages that don't allow access until I
| change the "lynx-*" header (bastards).
|
| Semi-OT: I'm addicted to lynx's multi-bookmarks feature (26
| different bookmark files for easing the organization of your
| links), and about 15 years ago I wrote some elisp so emacs-w3m
| has the same functionality (and same bookmarks files).
| shiomiru wrote:
| > I've been noodling about the implementation of adding
| functionality to w3m and lynx so there is a separate fetch-page
| func but report a different User-Agent header (eg, "Mozilla").
| I've encountered many pages that don't allow access until I
| change the "lynx-*" header (bastards).
|
| Wouldn't this feature suffice?
| https://github.com/tats/w3m/blob/master/doc/README.siteconf
| Rediscover wrote:
| Fantastic!!
|
| Thank You for directing that to me! And that repo (I've been
| using the .jp one).
|
| I'm an idiot - I don't know how I missed that.
| dcassett wrote:
| I really like using the links browser [0] because it is very
| fast, renders images (if you want), and colors are easily
| customizable.
|
| [0] http://links.twibright.com/
|
| Edit: Using it in graphical mode
| g0ran wrote:
| I'm all for concentrating on functionality over visuals, but
| that website ain't a way to win hearts and minds.
| hestefisk wrote:
| Is it under active development?
| rkta wrote:
| While the sourceforge project is staled, there is an active
| fork maintained by the Debian maintainer at [0].
|
| [0]: https://github.com/tats/w3m
| marttt wrote:
| Virgil Dupras, the author of Collapse OS, also has an
| interesting fork, w3l: w3m With Way Less:
| https://git.sr.ht/~vdupras/w3l
|
| Last commit was 1 year 5 months ago.
| rkta wrote:
| From the last commit: > So far, I've been removing tons and
| tons of stuff (and will continue), but now I can begin
| shaping up what I'll replace this with.
|
| Unfortunately he only removed stuff and stopped there.
| NoboruWataya wrote:
| How does it compare to elinks?
| nukemaster wrote:
| It handles much of the styling better than elinks (especially
| pre/code blocks iirc.) I don't like its equivalent to link
| numbering though.
| daneel_w wrote:
| The picture gallery is apparently under construction still. I
| wonder if it will ultimately contain a notice advising visitors
| to proceed by using a normal browser.
| rkta wrote:
| As w3m is able to display images in the terminal there is no
| need for such a notice.
| capableweb wrote:
| Doesn't seem to by default? Haven't used w3m in a looong
| time, but the submission page says the following about
| images:
|
| > No images (without terminal hacks). Images viewable
| externally via keystroke.
| shiomiru wrote:
| w3m displays images using w3mimgviewer by default, which is
| kind of a hack but works pretty well with xterm. It also
| supports both the kitty and sixel protocols;[a] I wouldn't
| call either of those a hack.
|
| In fact I find it very strange how they're introducing the
| only terminal web browser with inline image support as one
| incapable of displaying inline images, then writing an
| entire paragraph about why you don't need inline images in
| the first place.
|
| [a]: Only in the debian fork, mind you. The website seems
| to link to an unmantained version for some incomprehensible
| reason.
| pmoriarty wrote:
| I've been using emacs-w3m (which uses w3m under the hood) for
| many years.
|
| It is sooo nice to have a web browser well integrated in to an
| editor as powerful as emacs.
| neilv wrote:
| Agreed. About 20 years ago, I used the Emacs w3m support to let
| me browse HTML programming language books while coding on a 48
| MB RAM laptop.
|
| https://www.neilvandyke.org/w3mnav/
|
| https://www.neilvandyke.org/quack/
|
| https://www.neilvandyke.org/linux-thinkpad-560e/
|
| Getting docs into an efficient "IDE" is still nice. Just
| yesterday, I was using nov.el to occasionally reference Blandy
| et al.'s Rust book in Emacs, faster than I could the PDF or in
| a dedicated ebook reader program.
| ArtWomb wrote:
| emacs-w3m is exactly what I'm searching for. Regex to mine
| useful data from web sites has become a necessary evil.
|
| Ideal use case would be running webircgateway. Private self
| hosted irc chan for remote team. Accessed via emacs shell as we
| share code ;)
| frogcoder wrote:
| Just curious, what are the advantages using w3m instead of eww?
| m4lvin wrote:
| One example: When I open this page here, in eww all comments
| have the same left margin and I have no idea what is a reply
| to what, but with emacs-w3m the nesting structure is visible.
| tomxor wrote:
| Strange, I'm trying out standalone w3m right now and also
| don't get nesting. Maybe the emacs version is different.
| I'm guessing HN must indent with CSS (which w3m pointed out
| it does not attempt to support) even though the comments
| are in a table.
| lambdaba wrote:
| Actually, HN indents with a spacer gif, in true early
| 00's fashion :) <img src="s.gif"
| height="1" width="66">
| tomxor wrote:
| hah, I love it.
| abzug wrote:
| You can also have WebKit embedded in Emacs.
| pmoriarty wrote:
| I don't want images, though. I just want plain text.
|
| I also don't want javascript, as it opens me up to all sorts
| of javascript vulnerabilities and tracking.
|
| emacs-w3m is just text, no images, and javascript, which is
| exactly what I want.
| jmclnx wrote:
| I forgot about this. I just fired up Eww in my emacs session
| and ycombinator renders great
| eadmund wrote:
| Eww & emacs-w3m are different though. Both are great in
| different ways.
| tomxor wrote:
| Just trying this out for the first time.. Posted from vim inside
| w3m. Just took an 'apt install w3m' and 'w3m
| news.ycombinator.com'. Many of the default key bindings are vim
| like, took me a while to realise i had to use 'enter' to edit a
| form field rather than 'i' though.
|
| Only disadvantage I can tell for HN is lack of comment
| indentation beyond one level... which might be a deal breaker.
| shiomiru wrote:
| > Only disadvantage I can tell for HN is lack of comment
| indentation beyond one level... which might be a deal breaker.
|
| HN indentation works with spacer gifs, so you'll have to enable
| inline images for that to work. (Press o and tick YES for the
| Display inline images option.)
|
| EDIT: also if you're using debian you'll also want to install
| the w3m-img package. Or change the Inline image display method
| to img2sixel (and install libsixel) if your terminal supports
| sixels, or to kitty (and install imagemagick) if you're using
| kitty.
|
| (If your w3m version supports Inline image display method, that
| is. It's a relatively new feature.)
| culi wrote:
| > HN indentation works with spacer gifs
|
| ... holy shit this website is a living fossil
| krapp wrote:
| It's the coelacanth of web design.
| tomxor wrote:
| Thanks!
|
| The option was already enabled but not working, the w3m-img
| package fixed it... I was only expecting place holders and
| very surprised to see real images rendered, not sure how it's
| doing this since i'm using urxvt, which doesn't support
| images AFAIK... is this layered on top via xorg?
| shiomiru wrote:
| Yeah on xorg it just draws a window on top of the terminal.
| It _is_ a hack but one that works pretty well, it also
| supports framebuffer and supposedly even Windows.
|
| In fact many other terminal tools use w3m-img for image
| display on the terminal. Though both sixel and kitty
| protocols are nicer (kitty being as close to ideal as it
| gets), they're unfortunately not as widely supported.
| harryvederci wrote:
| Relevant Gotbletu video for creating a fzf (fuzzy finder) menu
| for your w3m scripts: https://www.youtube.com/watch?v=drzMQuLE4BM
| account-5 wrote:
| How does this do with sites that won't render without JavaScript?
| I browse with noscript and everything block by default. I'm
| constantly having to turn on JavaScript for sites that are blank
| until you do.
| daneel_w wrote:
| It comes to a grinding halt, just as it does with sites that
| use CSS for both enabling content and for its layout.
| rkta wrote:
| Sites that require JavaScript do not work in w3m, as w3m does
| not support JS.
| ape4 wrote:
| I suppose a command line browser could support JavaScript. Of
| course non trivial to do.
| yashasolutions wrote:
| https://edbrowse.org/ does support js and is 100% command
| line - but it's really closer to ed than it is vim in terms
| of user experience...
| inopinatus wrote:
| The old-fashioned way: breathe a sigh of relief, and move on to
| less egregious sites.
| shadowgovt wrote:
| It's a nice sentiment, but these days it's almost impossible
| to conduct business with JavaScript disabled. At least
| business in the parts of the economy I work in.
|
| The moment somebody sends me a Google Drive link (about three
| times a week), w3m goes back on the shelf and I have to pick
| up a modern standard-compliant browser.
| bscphil wrote:
| I don't anyone is suggesting that you should, in practice,
| adopt w3m or any other text browser as your exclusive way
| to access web resources.
| lupire wrote:
| grandparent comment was suggesting exactly that, with
| "breathe a sigh of relief".
| inopinatus wrote:
| I wrote that remark, and I was not. I'm not even using
| w3m right now, and observe that the comment I replied to
| was more general, relating to all browsing without
| Javascript.
|
| Extreme positions and interpretations are for nutters.
|
| In the specific case of Google Drive access, I like the
| Ruby client.
| shadowgovt wrote:
| The Ruby Client is great for data storage and retrieval,
| but I meant editing Drive docs (sheets, docs, etc.).
| Colleagues don't appreciate it when I drop their doc into
| another editor instead of commenting / recommending
| corrections in-place
| inopinatus wrote:
| Oh, for sure. I don't perceive those as websites, though.
| Sheets and Docs et al are basically thick-client office
| applications that happen to be written in Javascript. In
| this circumstance I just use Chrome since it's Google's
| official runtime. Or the "native" apps on a tablet, which
| I'd wager are just a packaged variant of the same code.
|
| I see this as congruent to the old-school Lotus
| Notes/Domino architecture, and not really about the web
| at all.
|
| There's no value in being an ideologue about it. My
| reasons for browsing with JS disabled-by-default are
| fourfold: 1. to defeat many/most active tracking methods,
| 2. as a sort of passive ad blocker, 3. because it's very
| often much faster, and 4. for written content JS
| dependence is moderately correlated to a poor S:N ratio.
| None of that has much bearing on an office application.
| rkta wrote:
| Fortunately w3m has an external browser commands which
| let's you open the current URL in a browser.
| shadowgovt wrote:
| If using a regular modern browser is a superset of the
| experience of w3m, why do I want to add the extra level
| of inconvenient indirection?
| LeFantome wrote:
| Actually, the idea that I so can easily launch a full
| browser in context is what has me wanting to give this a
| shot.
|
| I would love a less cluttered and less resource intensive
| web experience. I also know is unrealistic in 2022 to
| have a normal day of browser activity without needing
| JavaScript and / or CSS.
|
| If I can use a text browser much of the time and easily
| switch to a full browser only when I need it, that sounds
| like the best of both worlds. Lots of what I browse would
| likely be even nicer text only. This very site comes to
| mind.
| rkta wrote:
| If it is a inconvenient indirection for you, than w3m is
| probably not the right tool.
|
| The linked article mentions some reasons. I use it,
| because it fits my console-focused work style. It's
| blanzigly fast, removes all the distractions like
| unnecessary images and ads, doesn't require me to take my
| hands of the keyboard, works very well if I'm working on
| a mobile hotspot, can be used while being ssh'd into a
| server... and because opening the side in a regular
| modern browser is only a key press away.
| zeveb wrote:
| > If using a regular modern browser is a superset of the
| experience of w3m, why do I want to add the extra level
| of inconvenient indirection?
|
| Because using a 'regular modern browser' is not a
| superset; it also lacks certain things, such as freedom
| from JavaScript, freedom from some forms of tracking and
| it is incompatible with the terminal or other text-based
| environments. Some folks find those things to be
| worthwhile.
| chadlavi wrote:
| w3m does indeed rock, but most modern websites don't work without
| javascript.
|
| One thing it's really useful for is searching duck duck go (or
| similar) from the command line.
|
| I have this in my .zsh_aliases:
|
| ddg() { q="${@}"; w3m "https://duckduckgo.com/lite/?q=$q&kd=-1" }
___________________________________________________________________
(page generated 2022-04-10 23:01 UTC)