Page 1 of 1

Surf: A very lightweight, modern browser

Posted: Sun Nov 08, 2020 5:40 pm
by sc0ttman

surf

Surf is a very lightweight WebKit browser. It has full support for the modern web, HTML5, CSS3, latest JavaScript, etc.

See this fork: https://github.com/sc0ttj/surf

^ has the full README, build instructions, etc.

See a list of all the changes, nicely organised at: https://github.com/sc0ttj/surf/commits/main

Summary

I've done a patched version of Surf which adds a few things, to make it much easier to use:

  • adds modern search/location bar (accepts URLs, arbitrary search terms & custom search engines)
  • adds Firefox-like custom search engines in location bar.. so "yt foobar" wll search YouTube
  • adds the same key bindings as Firefox, Chrome, etc
  • adds easy bookmarking
  • no browsing history!
  • added some command line options (see surf --help)
  • many more features

Here are the key bindings I have added to this fork:

Code: Select all

  ctrl-l         # go to location/search bar (omnibar)
  alt-left       # go back one page
  alt-right      # go forward one page
  ctrl-b         # bookmarks menu
  ctrl-d         # bookmark current page
  ctrl-+/=       # zoom in
  ctrl-minus     # zoom out
  ctrl-0         # reset zoom
  ctrl-w         # to call externel player
  ctrl-q         # quit the browser

Requirements

To build it: surf requires GTK3 and libwebkit4gtk. You'll need the -dev packages to compile it.

To run it: surf requires dmenu for its UI menus at the top, and (optionally) tabbed to run with multiple tabs. Both are very small.

Note - it is still unfinished. I've got a few more features to add.

Tests

I have compiled it on FossaPup64, and it seems to work very nicely:

It uses less RAM and CPU than Palemoon, and supports more sites "out of the box".

(I'm using it to post this message.)


Homepage of the original: https://surf.suckless.org


Re: A very lightweight, modern browser

Posted: Tue Nov 10, 2020 9:15 pm
by foxpup

@sc0ttman I would very much like to try it, but
I cannot compile it in Fossapup64.
I have the same with the original from suckless.
But the download on suckless for 2.0 from 2017 does compile.

I only change the PREFIX to /usr in config.mk and then make clean install.
The compile aborts with

Code: Select all

/bin/sh: c99: command not found
make: *** [Makefile:23: surf.o] Error 127

I think I have all the deps installed (and more).

What am I missing?


Re: A very lightweight, modern browser

Posted: Wed Nov 11, 2020 11:02 am
by sc0ttman

Symlink gcc to c99 ... Worked for me..


Re: A very lightweight, modern browser

Posted: Wed Nov 11, 2020 10:09 pm
by foxpup

Thanks @sc0ttman . It worked for me.

I am using Surf now. It works fine. It is very fast. :thumbup:
I will report if something is not working.


Re: A very lightweight, modern browser

Posted: Wed Nov 11, 2020 11:10 pm
by sc0ttman

From my usage of it, I came to these conclusions:

- it's faster that Palemoon, works most places, indeed does have low mem and CPU usage
- disable JS for google and a few others in the config and its super fast (no particular loss of features/functionality)
- sometimes freezes on pages with videos
- not having a standard text input location bar at the top can be a pain (dmenu doesn't cut it)
- downloading stuff is a bit lame .. especially if trying to save pages as HTML

.... I also found other, similar browsers ..

- surfer: a bit like surf, but with a simple GTK toolbar at the top
- wyeb: very nicely made "under the hood".. weird features, vim-style key bindings, very hackable

...I had a play at fixing/improving the GTK menus in surfer, have learned a little C and Gtk in the process..

Decided for a truly lightweight browser that hits the "sweet spot" between being simple, minimal and still very usable, it's best to have a go at hacking wyeb - to give it nice menus, and a good about:config page exposing all its (many) settings.

Will give it that a go at some point.


Re: A very lightweight, modern browser

Posted: Mon Nov 16, 2020 10:48 pm
by dellus

I always thought there should be a puppy own browser, but I assumed it's way too much effort to be done by puppy developers. But hey, an existing one modded to fit puppy, wouldn't that be lovely and doable?
It will then be named Psurf, or as it's fast, Greyhound or what about Whippet?

Could you provide your experimentals as pets to try out, even if not perfect?


Re: Surf: A very lightweight, modern browser

Posted: Tue Nov 17, 2020 9:14 pm
by sc0ttman

I always thought there should be a puppy own browser, but I assumed it's way too much effort to be done by puppy developers. But hey, an existing one modded to fit puppy, wouldn't that be lovely and doable? It will then be named Psurf, or as it's fast, Greyhound or what about Whippet?

Hopefully we'll be able to come up with something :)


Surfer

https://github.com/sc0ttj/surfer

^ This is a fork of a different one (not suckless.orgs surf).

It has a Gtk menu bar at the top, no need for dmenu.

I updated the Gtk menus a bit.. Made them use UTF-8 icons embedded in the system font.

In other words, you need to have a Nerd Font installed to get the icons (I think).

I'm gonna bundle the font with it at some point.. But I have yet to get stuck into this one properly yet.

Just like with my surf fork, the intended changeds are basic:

  • simple location bar at the top (should accept URLs, partial URLs, and search terms)
  • vanilla, standard, familiar key bindings and features
    • Ctr-d to bookmark current page
    • Ctrl-b to list all bookmarks
  • proper, context aware right-click menus
    • for clicking a page
    • for clicking links
    • for clicking on selected text
  • proper "Downloads" tab/page to view ongoing and finished downloads
  • support "add ons" in the form of .js files you can add into a config folder

As I see it, a basic, familiar, user-friendly browser doesn't need too many features.


Re: Surf: A very lightweight, modern browser

Posted: Fri Nov 20, 2020 6:09 am
by muggins

Tried to compile on LxPupSc64 and just too many errors. So instead tried using Scottman's pkg and
almost succeeded.

At first, on trying to run surf on commandline, received an error about missing libwebp.so.6, so tried:

Code: Select all

ln -s /usr/lib64/libwebp.so.7 /usr/lib64/libwebp.so.6

But then surf gives me:

Code: Select all

symbol lookup error: /usr/lib64/libwebkitgtk-1.0.so.0: undefined symbol: UCNV_FROM_U_CALLBACK_SUBSTITUTE_56

Re: Surf: A very lightweight, modern browser

Posted: Fri Nov 20, 2020 7:42 am
by williams2

Sometimes a symlink will work.

In your case, it really needs the file libwebp.so.6,
libwebp.so.7 won't work, it is not binary compatible.