Do you use Firefox or Chrome and find that your Linux web-browsing experience is a bit bloated? Surf could be the minimalist paradise you didn’t know you’d been waiting for.
Surf’s official site says the browser “is able to display websites and follow links.” That’s it. There’s no built-in support for tabs and no included method of bookmarking – just a bespoke Internet experience.
If that sounds like your kind of deal, you can install it right now.
Installation of Surf
The most reasonable way to get Surf is with Git:
git clone https://git.suckless.org/surf
Like I also discussed in my Dwm tutorial, Surf encourages you to edit its configuration file “src/surf/config.h” in the cloned base folder to manage your preferences for hotkeys and your installation of add-ons, which I will mention later.
Therefore, installing from source makes sense if you will be changing that code. You can install the browser from precompiled binaries, but any updates will overwrite the changes you make to their configurations.
That said, installing a precompiled package from Ubuntu or Arch, or your chosen distro, can give you an easy opportunity to try a default Surf without any heavy lifting.
sudo apt-get install surf
sudo pacman -S surf
I will reference the program’s default keyboard commands throughout the rest of this article, so you should be able to follow along regardless of installation style.
Surf makes heavy use of the keyboard. You can open new websites, reload, scroll vertically and horizontally, and zoom without touching the mouse.
There are two ways to open a link. First, you can open your terminal and type
surf URI. Change
URI to the URL of the website that you want to visit. That command will open a new window to that URI.
That link may look familiar if you read my recent tutorial about the Solarized color scheme.
You can also open a link by first opening Surf with no argument – either from the command line or from a program launcher – and typing Ctrl + g.
You will see a blank browsing window when the program opens. The command will open a Dmenu toolbar at the top of your screen. You will need to install Dmenu for this to work. It should be available in your distro’s repositories. After installation and following these instructions, you should see something like the following image.
The toolbar at the top of that screenshot is Dmenu. Below it is the default Surf browser that hasn’t yet loaded a page. In Dmenu I have typed “duckduckgo.com” to visit that website. You can do the same for any site; hit Enter to follow the link you provide.
The rest of Surf’s navigation isn’t as easy to demonstrate in images. I’ll just point out a few helpful commands you can use to get started.
- Move back in browsing history: Ctrl + h
- Move forward in browsing history: Ctrl + l
- Scroll upward: Ctrl + k
- Scroll downward: Ctrl + j
- Scroll right: Ctrl + i
- Scroll left: Ctrl + u
- Zoom in: Ctrl + +
- Zoom out: Ctrl + -
- Reset zoom: Ctrl + Shift + q
- Reload the webpage: Ctrl + r
You can also change how Surf displays the webpages it retrieves. Take a look again at its toolbar below.
Each letter in “@cgDISVMf:-” listed before the website’s title means an option is either turned off (lowercase) or on (uppercase). Open the project’s manual page with
man surf and scroll to “INDICATORS OF OPERATION” to see the full list.
The easiest to see and practice are often the “I” and “S,” which respectively stand for “images” and “scripts.” Both, in the image above, are on.
User Scripts and Add-ons
The files, for instance, include a user-created bookmarking script to your “config.h” file to give Surf the ability to bookmark pages.
Among many others, patches reveal a method of changing Surf’s default download manager and a script for changing its keybindings.
You should find many of these scripts similar to the add-ons available in Firefox or Chrome. They’re just a little more difficult to install here, and you’ll need to recompile Surf for any of these changes to take effect.
Surf offers a much different user experience than the web browsers most people are used to. I make heavy use of it because I like its simplicity and reliance on keyboard-based navigation. Hopefully you will find something to enjoy about it too.
Our latest tutorials delivered straight to your inbox