> Hacking the Dillo web browser updated March 5, 2026
Dillo is a fast and small graphical web browser which runs on many platforms, ranging from mainstream to obscure. It is written in C/C++ and uses the FLTK GUI library.
I have been running Dillo for a long time, and consider it to be an essential piece of software. Compared to the usual mainstream browsers, Dillo is tiny and light as a feather. There is no JavaScript support, and CSS support is limited. There is no built-in video player, spell-checker, PDF viewer, AI translation, and a bunch of other features are missing too.
So, what's the point of it then, if it can't do those things? The answer is simple: browsing the web. You know, the web where there are text and images, which you read and look at? At some point the modern web lost its way, with all of the bloated web-apps and massive JS frameworks which require hundreds of megabytes to show a box that says 'hello world'. Luckily there are still many sites that can be viewed with Dillo, and for the others that you can't live without, you can open them in one of the 'kitchen-sink' monstrosity browsers.
Modifying Dillo to add new features or to fix things is fairly straightforward, thanks to its simple and well documented code-base. That will be the focus of this post: presenting some patches for Dillo which I find useful.
Adding unveil support for OpenBSD
Unveil is a security feature created by OpenBSD developers to restrict a program from accessing all readable directories on a filesystem. This allows for greater security in the event that a malicious or exploited program tries to exfiltrate sensitive files from your system.
For example, an exploit in an image decoder library used by the browser could try to send your SSH keys to a hostile actors server. By using unveil, the program only has access to the directories which are strictly necessary for the operation of the program, and cannot access your keys.
Once the patch is applied, you will need to run 'configure' with the '--enable-unveil' flag. Additionally, it is necessary to add this option in 'dillorc' to turn it on:
enable_unveil=YES
Note: when using a 'file://' URI to access local files through Dillo, you will still be able to do so. This is by design. Since 'file.dpi' is a Dillo plugin, it runs as a separate process which does not inherit the unveil attributes. We are primarily concerned with external threats, which will still be mitigated with unveil enabled on the main Dillo process.
Download: unveil.patch
Theming the 'downloads' plugin
The stock downloads plugin has a somewhat dated look, and it doesn't really fit well with darker color themes, so here is a bit more modern looking dark theme:
Download: downloads-dark.patch
Adding a zoom button to the toolbar
Dillo already has page zoom controls, but they are only available via keyboard shortcuts. Sometimes it may be useful to have a way to control the zoom with the mouse.
The icon can be enabled/disabled with a setting in dillorc:
show_zoom=YES
Controls: left-click = zoom in, right-click = zoom out, middle-click = reset zoom.
Download: zoom-button.patch
Monochrome dark-theme toolbar icons
The stock toolbar icons are very nice and are made by a talented designer. However, when using a dark theme, the icons are a bit too colorful for my taste. I modified some of the icons and replaced others to create a high-contrast monochrome look, which fits much better with my color theme.
This is a work in progress, only the 'small' icon set is themed so far (which I prefer over the normal sized icons).
Download: mono-icons.patch
Tweaking the tab-bar
When you first open Dillo, the tab-bar is not visible. This is probably because there is only one page open and it's not necessary to show it. In fact, you could argue that showing a tab-bar with only one tab is foolish and just clutters the interface. However, this behavior is inconsistent with other browsers, which always show the bar by default.
The main drawback to not showing the tab-bar initially is that when you open a new tab, the toolbar and page contents are then shifted down by a certain amount of pixels necessary to draw the tab-bar. This can be seen as an annoyance by some users, since you then may need to reposition your mouse (and eyes) to compensate for this movement of the toolbar and page contents.
This patch makes it so that the tab-bar is always visible. Some more work is probably needed to make this complete, including adding a toggle to dillorc, but it gets the job done. If there is interest in officially including this feature in Dillo, I'd be happy to make a more complete patch.
In addition to tab-bar visibility, this patch also changes the tabs to have a more 'flat' appearance, which I think is an improvement. Finally, I have also hidden the 'tab close' button at the end of the bar. For me it is basically useless, since I just use middle-click to close tabs.
Download: tab-bar.patch
Full 'dark-mode' theme
Here is the result of above icon theme plus a few other patches, resulting in a complete 'dark-mode' theme:
Note that the scrollbar and page size widget have also been patched to look better in dark mode. I also use a custom 'style.css' file to make the web page use dark colors. The tooltips patch allows user defined colors instead of the stock hardcoded values.
Download: scrollbar.patch , pagesize.patch , tooltips.patch
How to apply these patches?
You will need a copy of the Dillo source. From the root of the source directory, issue the following command:
patch -p1 < filename.patch
(where 'filename.patch' is the patch file you wish to apply)
Then compile and install Dillo normally.