w3m text-mode web browser

Trying out new BBCode features? Use this forum!
Posts in this forum are subject to deletion without prior notice.

Moderator: Moderators

Post Reply
User avatar
Bregalad
Posts: 7884
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

w3m text-mode web browser

Post by Bregalad » Wed Jun 15, 2016 6:27 am

Just trying to make a new post usking w3m text-mode/command line web browser.

The editing interface uses the vim edit mode, which I am unfortunately not familiar with. However it can, somehow, include graphics in text mode, I do not know by which technical miracle.

lidnariq
Posts: 9421
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: w3m text-mode web browser

Post by lidnariq » Wed Jun 15, 2016 11:30 am

Under X11, it gets hold of the X11 handle for the X terminal that it's in, and then uses a call to XCopyArea to blit the image into the right place in the window containing the terminal.

Under windows, it instead uses a call to Gdiplus::Graphics::DrawCachedBitmap

User avatar
Bregalad
Posts: 7884
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: w3m text-mode web browser

Post by Bregalad » Wed Jun 15, 2016 1:42 pm

Well it was under neither, just under the real command line (with no graphical interface service started).

lidnariq
Posts: 9421
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: w3m text-mode web browser

Post by lidnariq » Wed Jun 15, 2016 1:44 pm

Well, there's the framebuffer method also. That's by far the least magical.

User avatar
Bregalad
Posts: 7884
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: w3m text-mode web browser

Post by Bregalad » Fri Jun 17, 2016 2:38 am

But how come there's a frameuffer in console mode? I tought console mode had a text buffer and graphics mode a framebuffer (at least that's what makes most sense to me).

calima
Posts: 1131
Joined: Tue Oct 06, 2015 10:16 am

Re: w3m text-mode web browser

Post by calima » Fri Jun 17, 2016 3:28 am

What you used wasn't likely a 80x25 VGA text mode, but a 1920x1080 KMS framebuffer mode (or whatever your screen is at). Was the font as big as in the old BIOS screens? If it wasn't, you were in a framebuffer mode.

lidnariq
Posts: 9421
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: w3m text-mode web browser

Post by lidnariq » Fri Jun 17, 2016 10:50 am

We've long since stopped using the video card's native text mode hardware. The last time it was really useful was with SVGATextMode's final release 16 years ago; since then we've mostly grown framebuffer-based text modes. (And even now, that specific mechanism is mostly being deprecated in favor of the Kernel ModeSetting infrastructure)

Version 3 and up of VESA VBE has allowed deprecating all sorts of pure-VGA compatibility things. I wouldn't be surprised if modern video cards can't be configured to to draw a 16 color planar mode, and if the mode 3h text mode is a vestigial stub that does something really weird underneath.

User avatar
Bregalad
Posts: 7884
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: w3m text-mode web browser

Post by Bregalad » Wed Jun 22, 2016 2:18 am

lidnariq wrote:We've long since stopped using the video card's native text mode hardware.
Sure, that's no big surprise, but form a software p.o.w. it doesn't matter how the text mode is rendered in hardware, if this is done by a geniune chip or a piece of firmware that renders it to a modern framebuffer-based system.

So that means lynx just abuses the firmware underneath and uses it to write images to the framebuffer?

User avatar
koitsu
Posts: 4217
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: w3m text-mode web browser

Post by koitsu » Wed Jun 22, 2016 2:32 am

Yup, correct -- as I understand it, they just interact with the framebuffer "directly" (through the kernel in some fashion). There's even w3m-img that apparently will render images/etc. using the same methodology.

There are many of us who still prefer the old classic 80x25 text mode and not use framebuffers -- I find the latter to be incredibly slow during screen scrolling of text (dmesg output on Ubuntu is a good example), even on systems with dedicated framebuffers. But then again, I also don't use *IX machines as desktops/workstations, so my desire for an actual framebuffer is virtually nil (I'm of the "if you're gonna go that far, might as well just run X.org" stance).

lidnariq
Posts: 9421
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: w3m text-mode web browser

Post by lidnariq » Wed Jun 22, 2016 9:58 am

Bregalad wrote:
lidnariq wrote:We've long since stopped using the video card's native text mode hardware.
Sure, that's no big surprise, but from a software p.o.v. it doesn't matter how the text mode is rendered in hardware, if this is done by a genuine chip or a piece of firmware that renders it to a modern framebuffer-based system.
At least in linux, the in-kernel VT100 emulator transparently updates the contents of the framebuffer in response to writes to /dev/tty. i.e. w3m thinks it's interacting with a dumb terminal, but w3m-img says "oh, hey, I'm in a framebuffer, let me go scribble all over everything" ... i.e. the point is that w3m-img breaks the abstraction.
So that means lynx just abuses the firmware underneath and uses it to write images to the framebuffer?
w3m, sure? Not lynx or or the other ones that are just in the emulated text mode.
koitsu wrote:framebuffers -- I find the latter to be incredibly slow during screen scrolling of text (dmesg output on Ubuntu is a good example), even on systems with dedicated framebuffers.
Before the KMS mess (linux's democratizing "no one can have a good interface, everyone must use the same awful one"), many of the in-kernel framebuffer drivers had hardware acceleration that made it feel as fast as the native text mode hardware.

Of course, the useful not-KMS drivers also date to when we had more than three serious video card vendors.

zzo38
Posts: 1065
Joined: Mon Feb 07, 2011 12:46 pm

Re: w3m text-mode web browser

Post by zzo38 » Sun Jul 10, 2016 6:21 pm

The better way to draw pictures on a terminal would be to use Sixel graphics (as far as I know, only xterm currently implements this feature).
[url=gopher://zzo38computer.org/].[/url]

Post Reply