Someone asked me to build a package for Netsurf. I had never heard of Netsurf before. It turns out that Netsurf is a cross-platform web browser which also runs on Linux. Its rendering engine is written from scratch, therefore the browser does not share code with any of the big browsers. Netsurf is actively developed and has a healthy community. A new version was released last week – 3.7.
Functionally speaking, this browser is not as versatile or capable as other modern browsers, but its advantage is that it is small, fast, suited for low-end hardware, and more importantly: it works on the Linux framebuffer. This means that you can have a basic graphical web browser on your server console. It looks better than “links -g”.
Note: even though Netsurf comes with both a GTK version (netsurf-gtk) and a framebuffer version (netsurf-fb), even the framebuffer binary make heavy use of X.Org and freetype libraries. So if you want to use the framebuffer browser on a server console, you need to install the X series anyway.
How to make Netsurf work on the Linux framebuffer, i.e. on the console?
- Add your user to the “input” group so you can use the mouse (i.e. the /dev/input/mice device node) using the command (as root):
# gpasswd -a your_username input
If you are currently logged on, you need to logout and login again to make this change effective. - Determine the width and height of your framebuffer console to make maximal use of your screen dimensions (netsurf on a framebuffer defaults to a window of 800×600 pixels) by querying the /sys virtual filesystem and look for the characteristics of the fb0 framebuffer device:
# cat /sys/class/graphics/fb0/virtual_size
This will return width and height in pixels, comma-separated. In my case I get “1920,1080”. - Read the available documentation to learn about the limitations.
With the above taken care of, start the Netsurf framebuffer browser with:
$ netsurf-fb -w <width> -h <height>
… where <width> and <height> are the values obtained from the command further up.
Curious? Get the package from my regular repository (http://www.slackware.com/~alien/slackbuilds/) or any of its mirrors.
If you want to compile netsurf yourself, you’ll also need two dependencies, “perl-html-tagset” and “perl-html-parser“.
Recent comments