top | item 17487552

Show HN: Browsh – A modern, text-based browser

967 points| tombh | 7 years ago |brow.sh | reply

322 comments

order
[+] tombh|7 years ago|reply
Some of you may have seen this before under its previous incarnation of "Texttop". Then it was just a hack, but I got some great feedback, so I've spent most of the last 12 months turning it into something serious. It's morphed into more than a mere TTY gimmick. That UNIX philosophy of text being the "universal interface" has somewhat unexpectedly risen to the forefront, such that Browsh is now essentially a text browser engine, serving to both TTY clients and, somewhat ironically, other browsers - see https://html.brow.sh Being able to render any modern site (even WebGL for example) to text seems like an appropriate return to the web's origins. The obvious benefit being to those less fortunate that have slow and/or expensive bandwidth.

Also, I'd be interested in any opinions here about how to financially support this project. At the very least I'd just love to somehow make this my job.

[+] masukomi|7 years ago|reply
> Also, I'd be interested in any opinions here about how to financially support this project. At the very least I'd just love to somehow make this my job.

I think before you can answer that question you have to figure out if there are enough geeks like you who think this is a useful enough tool to run / use regularly. They'll likely pay you $. Alternately, find use case where even just a few users / companies would pay $$$ each for some thing that it does that you can't easily get anywhere else and helps get work done.

For me it looks cool, and i'll give it a try, but i'm more likely to stay with my normal browser because with plugins like vimium i don't have to reach for my mouse very much. That's actually one of the reasons i use the command line so much. Make it work without constantly using my mouse and I'd be far more likely to use it. Once i'm using it regularly, then I'd be starting to think "I wish it would..." and then making those wishes come into practice is something i'd support. This is kind of a weird / esoteric thing that would just gradually improve so... maybe Patreon is a better route for getting support than normal software / feature / plugin sales.

personally, IF I find myself using it regularly, i think i'd be more likely to support you via a Patreon type regular donation.

[+] monch1962|7 years ago|reply
I could see this being part of a lightweight browser UI testing framework.

There's already ways to drive a headless UI (Selenium, puppeteer), but they require automation testers to interact with page elements via the "normal" DOM which can be quite painful in terms of creating automation tests - DSLs to drive DOM automation are necessarily huge.

I could envision browser automation via browsh using a very small DSL e.g. browsh.url() to navigate to a URL, browsh.click() to click on an element, browsh.text_exists?() to check whether text exists, browsh.link_exists?() to check whether a clickable link exists

[+] primitivesuave|7 years ago|reply
This is not my favorite monetization strategy, but if you had enough people using your browser you could serve text-based ads in place of the now-pixelized image ads on the screen. To test this model right away, you could contact a developer-focused ad network like Carbon (https://carbonads.net/)

Another insidious idea is to pitch this browser to companies as a way to reduce wasted time on social media and time-wasting websites - employees could be trained on how to quickly extract text information from a website that is relevant to some business goals, without getting distracted by the time-wasting opportunities that a browser provides.

What I would love to see (but where far fewer promise of riches lay) is to use this as part of some great developer tool - this seems it could be a more intuitive way to test an interface than Selenium. Until then I look forward to personally supporting and using your awesome project!

[+] bryanrasmussen|7 years ago|reply
actually one problem you have here, and you're probably realizing from the responses, is a problem I had with a personal project that could be used to build lots of things that people wanted, but in itself was not a thing people want. In order to monetize you need to build one of the things people want, but in doing so you put focus into one area and stop improving the generic base of everything, as well as not producing many little toy examples of the possibilities of your technology.
[+] josh921|7 years ago|reply
Regarding financing, perhaps you should consider collaboration with the Tor Project.

Many Tor users disable Javascript, because Javascript sometimes has anonymizing vulnerabilities. But disabling Javascript cripples many websites.

But I can type html.brow.sh/https://example.com via my Tor browser and get a non crippled website, even with Javascript disabled. This is a very practical use case and I think many will want to pay you to make it work better.

[+] themodelplumber|7 years ago|reply
Charge for plugins? For example, user macros, user styles, integration of other apps, advanced bookmarks, etc. Sell merch, create your own awards for lo-fi websites and charge people to nominate their sites. Hope it works out for you!
[+] tsukikage|7 years ago|reply
Stupid question: how do you follow links without a mouse? e.g. with Lynx you'd use the arrow keys / enter - this doesn't seem to work here, and there's nothing obvious in the keybindings document.
[+] thaumaturgy|7 years ago|reply
I've been messing about with a toy search engine for a long time, and starting to tie it into my Pinboard bookmarks (6,000 and counting!), and the most irritating part of the whole thing for a while has been extracting useful text from modern websites.

I'd considered using a headless browser setup but I never got 'round to it.

If you structured this as a paid service where I could make some number of requests for some amount of money and get back basically what you've got now in monochrome mode, I'd probably sign up pretty quick.

This is sort of relevant to some other recent HN discussions around the trouble with large-scale crawling and the trouble with so much of it being restricted to Google now, so I don't think I'm the only one.

[+] vorpalhex|7 years ago|reply
> I'd be interested in any opinions here about how to financially support this project. At the very least I'd just love to somehow make this my job.

One of the cases where developers still use text based browsers is in attempting to check accessibility of websites. For many large enterprises, there's a legal or contractual requirement to ensure a certain level of accessibility for users with disabilities.

[+] dheera|7 years ago|reply
Damn. Even Youtube works. Never thought I'd be watching movies over SSH.
[+] adamredwoods|7 years ago|reply
My guess is to try upselling features like anonymous browsing, ad-blocking, etc. Other ideas would require discovering use-case scenarios for corporate situations: can it be used as a cms-front end or a way to focus on text for localization? a11y testing? You never know.
[+] snarfy|7 years ago|reply
Run it as a service. I send in a URL and maybe TERM type, you send back the rendering complete with escape sequences etc.

You might not see the need for this, but others will. I could see it being used in some back end workflow.

[+] mamcx|7 years ago|reply
Well stay chargin for it. Put a button and give a dedicated connection for people that pay?
[+] asdojasdosadsa|7 years ago|reply
Out of pure curiosity, how much are you profiting currently out of it?
[+] bryanrasmussen|7 years ago|reply
if it was pluggable into other browsers, or other browser's extensions, then charge a small fee for that kind of usage.
[+] se7entime|7 years ago|reply
Will you put it in Flatpak or Snap?
[+] g-harel|7 years ago|reply
weird, that link doesn't work on localhost /s
[+] sevensor|7 years ago|reply
Can it be made not to show WebGL, embedded video, and so forth? I enjoy a very serene internet using w3m set to monochrome, with mouse and images turned off. Every now and then it's necessary to use a graphical browser, and it's the sensory equivalent of being woken up by a toddler at 5:30 on Christmas morning.
[+] bovermyer|7 years ago|reply
What you call "serene," I would call "austere." That's not meant as a denigration, mind you: I'm very curious as to your viewpoint here. What do you enjoy about such an experience?
[+] tombh|7 years ago|reply
Yes. Just press `ALT+m` to toggle monochrome mode.
[+] saagarjha|7 years ago|reply
No offense, but why don’t you just continue to use w3m?
[+] jhanschoo|7 years ago|reply
Seeing as images are so pixelated as to be near-indistiguishable, I think it would be nice for browsh to have a status line where it shows accessibility metadata (e.g. alt="" attributes) of whatever element is currently in focus.

It might also be nice to have a mode where images are just replaced by filled boxes that are more visually distinguished from the surrounding content.

[+] bwag|7 years ago|reply
> Its main purpose is to significantly reduce bandwidth and thus both increase browsing speeds and decrease bandwidth costs.

How does it reduce bandwidth exactly? It still has to grab all the html/css/js for the site being rendered.

[+] void_starer|7 years ago|reply
Also check out: Emacs eww. Handy when you are reading through a manual with lots of code examples, and copy pasting from a web page becomes work by itself.

Just in case you're put off by the thought of Emacs keychords, note that you can also use mouse to move backward and forward through history (it has icons for those), and of course you can click links.

But more importantly, it's Emacs. So if you wanted, you can press a key have the code copy-pasted to a temp file, run the compiler on that, display the result in a new window and file away both the code and the result to an org file for further studying.

[+] RSZC|7 years ago|reply
Pretty sweet!

Curious: why headless firefox and not headless chrome? Also: 'its main purpose is...to reduce bandwidth.' How does this reduce bandwidth? Is the assumption that you would deploy browsh on a server and ssh/mosh against that, and the bandwidth savings are to the client? (But full bandwidth usage to the server)?

[+] tombh|7 years ago|reply
Curiously, Chrome doesn't support extensions in headless mode. And Browsh needs to run some custom CSS and JS to help with parsing, so Chrome was a no go. You can inject CSS and JS using the RPC though, but that RPC standard (https://remotedebug.org/) isn't yet supported by Firefox. So at the time I felt that using the webextension standard was a more cross-browser investment. Perhaps I should revisit that decision.

And yes you're right about the use of a remote server to make use of the bandwidth savings.

[+] lucb1e|7 years ago|reply
Because Firefox is open source, in the same vein as this project? Just a guess.
[+] mlinksva|7 years ago|reply
Reminds me a bit of reading about (I don't recall actually using one) web accelerators, or proxies that would retrieve and strip down content requested by a low powered/bandwidth client. I think these have pretty much disappeared over the last 10 years as bandwidth increased and mobile devices became more powerful.

Added: I guess https://www.opera.com/turbo still provides this feature. Is there anything comparable that can be self-hosted?

[+] alpaca128|7 years ago|reply
Is there a way to point it to a different Firefox installation path? It only looks at Program Files{x86} and then quits as it doesn't find the FF installation at Program Files.
[+] tombh|7 years ago|reply
Use the `-firefox` flag. However the Windows binary has other problems.

You can use the free live demos though: `ssh brow.sh` and https://html.brow.sh

[+] hestefisk|7 years ago|reply
This kind of stuff helps restore my faith in humanity. It makes me feel like a hacker again. Life starts and ends with the command line.
[+] tedmiston|7 years ago|reply

    $ ssh brow.sh
    All of Browsh's servers are currently busy. Please try again soon.
    Connection to brow.sh closed.
Seems like a cool way to do a demo for something that's a bit painful to install on macOS (would love to see $ brew install browsh). I'll have to give it another look once the HN effect has died down.
[+] gbajson|7 years ago|reply
In my case it generated SIGSEGV and the "Connection to brow.sh" was closed.

The more interesting that my gnome-terminal still receives/prints some codes. When I hit enter, it tries to execute them!

https://ibb.co/buhqE8 and (ENTER) https://ibb.co/itFz7T

Does anyone of you know the mechanism behind it?

EDIT: Does anyone of you know how to use it to type into terminal "sudo su -"?

[+] thomasahle|7 years ago|reply
I found that the docker version was the easiest to get running on Mac. It's just `docker run -it browsh/browsh`, and it downloads and runs everything automatically.
[+] mastrsushi|7 years ago|reply
Can someone explain the usecase for Text-based browsers? While they're fun to show off to my non-tech friends when running without X11 and looking like a hacker, I've never needed one.
[+] jacquesm|7 years ago|reply
Mind blown how accurate this is, I've sent you some BTC as token of appreciation even though I do not have any application for what you've built right now. A lot of work has gone into this and it shows.

edit: it's so good that I got confused about which window I was looking at and tried to click links with the mouse :)

[+] tombh|7 years ago|reply
Thank you very much indeed.
[+] textmode|7 years ago|reply
"As of writing in 2018, the average website requires downloading around 3MB and making over 100 individual HTTP requests. Browsh will turn this into around 15kb and 2 HTTP requests - 1 for the HTML/text and the other for the favicon."

Does "100 individual HTTP requests" mean 100 TCP connections?

As far as I know, according to RFC 2616, connection keep-alive was intended to promote making numerous HTTP requests. In fact, IME, most web servers default to setting max-requests at 100. Some are higher.

Following the guidance of the RFCs, for decades I have been using this HTTP feature to make 100 requests to a site in a single connection. That is 100 pages of HTML in one quick TCP connection. If I retrieve 3MB, it is 3MB of HTML from the website and zero from third parties. (Further, I have written filters to remove junk from the HTML and print only the content I want, e.g. for reading or to import into database. If I need to split into separate files, which is rare, csplit works nicely.)

In order to achieve this efficiency I could not and do not use a popular browser authored by ad-supported entities. I am an avid text-based web user who has no need for ads, graphics, and other external resources, e.g. Javascript. As such, I can use clients that can support http pipelining according to the RFCs. It works very well; no complaints.

Best of luck with this project.

[+] drinchev|7 years ago|reply
For someone stuck in the ssh demo, as myself. Ctrl+Q will exit the browser and end the ssh connection.