nunosempere.com/blog/2022/12/20/hacking-on-rose/index.md

2.6 KiB

Hacking on the Rose browser

I recently spent a few days hacking on the rose browser. It's a minimalist browser for Linux machines which is easy to play with. I enjoyed the experience, and thought to leave some notes.

Rose is written in C, and uses the Webkit and GTK libraries. Webkit, which drives Safari, started out as a fork of some previous open-source libraries, KHTML and KJS. GTK is a library for creating graphical interfaces. You can use the two together using WebKitGTK.

Image of this blogpost from the rose homepage
Pictured: An earlier version of this blogpost in the rose browser.

Personally, I find the simplicity of the code soothing. Still, to improve usability and for my own enjoyment, I've been adding some code to it. You can have a look at my tweaks here. These implement two main changes:

  1. I've implemented a reader mode
  2. I've added redirection functionality, which redirects users to open source frontends of otherwise annoying websites.

The reader mode, for instance, returns this beautiful to read page:

Pictured: Good newsletter, where you can read the content

when fed the cluttered aesthetic abomination that is Matt Levine's newsletter:

Pictured: Bad newsletter, with lots of advertisements

I lifted the code for doing this from Firefox, figured out how to integrate it with WebKit, and then made a few modifications.

As mentioned, I also wrote a version of LibRedirect for the rose browser. It which direct annoying websites into better open-source versions:

Pictured: list of sites that I am redirecting

Lastly, I've added some code for installing the Rose browser on Ubuntu 20.04, which is what I'm personally using.

If you are a close friend using Linux feel free to reach out if you get stuck trying to install this.