20 ms·
W3M Rocks
- rosndo 5y agoWorth 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 5y agoAre they, despite not having most of the attack surface other browsers have (due to not supporting a lot of features)?
- rosndo 5y agoYes. The problem is that the features which they do support (which are still plentiful) are not particularly well implemented. Parsing HTML is difficult.
- antiframe 5y agoDo 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 5y agoIt’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 5y ago> 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 5y agoNot 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 5y agoThey 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 https://github.com/eafer/rdrview [1]: https://git.sr.ht/~seirdy/bwrap-scripts/tree/trunk/item/w3m-sandbox https://git.sr.ht/~seirdy/bwrap-scripts/tree/trunk/item/w3m-...
- ramesh31 5y agoWhat 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.
- mikojan 5y agoUh you can just disable JavaScript in Firefox' about:config
- marginalia_nu 5y agoNot 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 5y agoYou 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 5y agonetsurf?
- calgoo 5y agoI 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 5y agoI’m fairly certain I’ve read about someone doing this exact thing before.
- rkta 5y agoI 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 5y agoI 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 5y agoYes, 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 5y agoSomething 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 http://man.cat-v.org/plan_9_2nd_ed/1/mothra
- rkta 5y agoIt 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.
- hestefisk 5y agoIs it under active development?
- rkta 5y agoWhile the sourceforge project is staled, there is an active fork maintained by the Debian maintainer at [0]. [0]: https://github.com/tats/w3m https://github.com/tats/w3m
- marttt 5y agoVirgil Dupras, the author of Collapse OS, also has an interesting fork, w3l: w3m With Way Less: https://git.sr.ht/~vdupras/w3l https://git.sr.ht/~vdupras/w3l Last commit was 1 year 5 months ago.
- rkta 5y agoFrom 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.
- harryvederci 5y agoMaybe this is true then: > Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
- account-5 5y agoHow 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.
- rkta 5y agoSites that require JavaScript do not work in w3m, as w3m does not support JS.
- ape4 5y agoI suppose a command line browser could support JavaScript. Of course non trivial to do.
- yashasolutions 5y agohttps://edbrowse.org/ 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...
- daneel_w 5y agoIt comes to a grinding halt, just as it does with sites that use CSS for both enabling content and for its layout.
- inopinatus 5y agoThe old-fashioned way: breathe a sigh of relief, and move on to less egregious sites.
- shadowgovt 5y agoIt'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.
- daneel_w 5y agoThe 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 5y agoAs w3m is able to display images in the terminal there is no need for such a notice.
- capableweb 5y agoDoesn'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 5y agow3m 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 5y agoI'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.
- jmclnx 5y agoI forgot about this. I just fired up Eww in my emacs session and ycombinator renders great
- eadmund 5y agoEww & emacs-w3m are different though. Both are great in different ways.
- frogcoder 5y agoJust curious, what are the advantages using w3m instead of eww?
- m4lvin 5y agoOne 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 5y agoStrange, 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 5y agoActually, HN indents with a spacer gif, in true early 00's fashion :) <img src="s.gif" height="1" width="66">
- every 5y agoI 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/ https://lynx.invisible-island.net/
- unfocussed_mike 5y ago> Conserve eyesight Well that sounds scientific. (Never used w3m but links is a useful browser)
- dcassett 5y agoI 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/ http://links.twibright.com/ Edit: Using it in graphical mode
- g0ran 5y agoI'm all for concentrating on functionality over visuals, but that website ain't a way to win hearts and minds.
- readingnews 5y agoDoes 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/ http://w3m.sourceforge.net/ I use links (gentoo user here), but I do not really see a huge difference between the three.
- gjvc 5y agothere is no "we", just the decision of each person.
- zamadatix 5y agoThere 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 5y agonot one any individual can accurately represent to any reasonable degree of confidence
- zamadatix 5y agoBut 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 5y agoi think you need to reread this thread
- tomxor 5y agoJust 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 5y ago> 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.)
- tomxor 5y agoThanks! 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 5y agoYeah 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.
- culi 5y ago> HN indentation works with spacer gifs ... holy shit this website is a living fossil
- chadlavi 5y agow3m 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 https://duckduckgo.com/lite/?q=$q&kd=-1" }
- anthk 5y agoOn JS, set the User Agent to the PSP one (Ddg it). Most sites will render well enough.
- NoboruWataya 5y agoHow does it compare to elinks?
- nukemaster 5y agoIt handles much of the styling better than elinks (especially pre/code blocks iirc.) I don't like its equivalent to link numbering though.
- Rediscover 5y agoEmacs-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 5y ago> 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 https://github.com/tats/w3m/blob/master/doc/README.siteconf
- Rediscover 5y agoFantastic!! 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.
- harryvederci 5y agoRelevant Gotbletu video for creating a fzf (fuzzy finder) menu for your w3m scripts: https://www.youtube.com/watch?v=drzMQuLE4BM https://www.youtube.com/watch?v=drzMQuLE4BM
- thamer 5y agoIf you want to try w3m in Docker (although without support for images), I found it packaged in 14 MB only: docker run -it --rm corbinu/alpine-w3m https://news.ycombinator.com Press [tab] to navigate from link to link, [enter] to follow a link, [⇧+B] to go back, and [q] to exit. You can also run it with --help instead of a URL for a help page.