As a text-mode browser it’s just that little bit better than Lynx (my old favourite),
but I found its graphical mode today, and once I fix a couple of little niggles I’ll
be hooked.
Really, nowadays you can only be stubborn and use text-mode for some
really simple browsing. Try using Google text-mode: the search part on Google is okay,
but how many of the sites you get linked to are legible? And you really don’t want
to light up X on your file server just to check some webmail.
So — Links has a graphical mode that works not only under X, but on the console as
well. Console graphics mode can utilise SVGAlib, or it can talk to the frame-buffer
using either DirectFB or its own internal driver.
What *really* surprised me is that Linux multiple virtual consoles still works: when
running Links graphical, I can still use “Alt-Fx” to get to my other Linux consoles.
Plus, Links has support for its own multiple windows using “Alt-x” to switch.
It actually helped me find a bug in my system monitoring tool. I use mrtg-rrd, a CGI
script that creates web pages and graphs that look like MRTGs own work; this is needed
when you convert to using RRDtool as a backend for MRTG (which means that MRTG does not
produce the web output any longer). I thought I had configured to generate PNG graphics, and indeed the image filenames ended in .png,
but no graphs would display when I viewed the page in Links. I double checked that
Links has PNG support: it does, as well as JPEG and a few other formats.
To cut a long story short: the CGI script uses a Perl module called RRDs to actually
invoke rrdtool and generate the graph. Turns out that this module was actually generating
a GIF image; even though the makers of mrtg-rrd.cgi make it an option to create PNG or
GIF, RRDs can only make GIF. The funny part is that evey other browser I’ve ever used to
look at this output has not been bothered by the fact that GIF output was contained in a
with a .png extension, but Links seems to be — indeed, as soon as I changed the names to .gif,
Links was happy.
So, long story, and where is the bug really? In Links? Well, maybe it’s being a bit
agressive by not taking the contents of the file at face-value, but I don’t think it’s
unreasonable to expect a webmaster to put accurate extensions on files… Is the bug
in RRDs? I doubt it — I can’t see where it makes any claim to being able to create
PNGs, but on the other hand RRDtool supports generating formats other than GIF, and
RRDs should not be assuming that all graphics are GIF… Is the bug in mrtg-rrd.cgi?
That’s tough, as it seems like the author has put function into his code that cannot
be supported by the support code he’s calling — it’s a variation on what I call the
“Maverick Syndrome”[1].
Now, when the only running machine I can access is my production file server, and I
really have to go to eBay and see what auctions I’m losing, I don’t have to
boot up my desktop or schlepp a laptop out of hibernation.
So, how can you join my console-browsing utopia? links -g is a starting point.
If it doesn’t work (and it didn’t on my SUSE 9.0 box), consult the error message. I found that
once I had the right USE flags (on my Gentoo machine) it just built right up, and I just
had to muck about with permissions on some device nodes to get things working. The
SUSE box is more of a problem, since it looks like they’ve omitted framebuffer support
from their binary, but I’m sure that a solution for that will be just an SRPM away!
Links gets my second-highest rating: “Worth every bit of what I paid for it”. Happy surfing!
[1] From the movie ‘Top Gun’: “Son, your ego’s writing cheques your body can’t cash.”