Qutebrowser troubleshooting

From wikinotes

Custom Root CA Cert

QWebEngine can be picky if you installed your custom root-CA cert in /etc/ssl/certs/.
You can install it for your current user as a workaround.

See https://homepage.ruhr-uni-bochum.de/jan.holthuis/posts/using-burpsuite-with-qutebrowser
and https://github.com/qutebrowser/qutebrowser/issues/843

certutil -d "sql:$HOME/.pki/nssdb" -A -i mycert.pem -n "wiki" -t C,,

Terminal Editor

It is wasteful to install gvim/nvim-qt if you are only using it for this.
Instead try configuring your terminal.

" ~/.config/qutebrowser/config.py
"
" (c/config) objects are added to scope magically

c.editor.command = ['gvim', '-f', '{}']
c.editor.command = ['st', '-e', 'vim', '{}']
c.editor.command = ['xterm', '-e', 'vim', '{}']

qutebrowser tooltip illegible

You can fix this with qt5ct style overrides.

/* ~/.config/qt5ct/qss/darkmode_tooltip.qss */

QToolTip{
	background: #f8f0dc;
	border-radius: 0px;
	border: 0px solid #000000;
	padding: 2px;
	color: #5c6a72;
}
# ~/.config/qt5ct/qt5ct.conf

[Appearance]
standard_dialogs=gtk2

[Interface]
stylesheets=/home/will/.config/qt5ct/qss/darkmode_tooltip.qss
QT_QPA_PLATFORMTHEME=qt5ct qutebrowser

See https://github.com/qutebrowser/qutebrowser/issues/4520

Ugly Github/Stack Overflow Fonts

Fix by overriding the Helvetica font with Droid Sans

NOTE:

This can also be performed for a single user alone in ~/.fonts.conf

~/.fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="pattern">
    <test qual="any" name="family"><string>Helvetica</string></test>
    <edit name="family" mode="assign" binding="same"><string>Droid Sans</string></edit>
  </match>
</fontconfig>

Then rebuild the font-cache, and test using fc-match.

fc-cache -fr         # force rebuilding of font-cache
fc-match helvetica   # check to see which font answers to helvetica

See :

Explanation:

The problem is that github's css stylesheet configures the body like this:

body {
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}

Helvetica is specified before Arial. Helvetica is a non-free font, and I have a different uglier font that is registering as helvetica. So the ugly helvetica approximation is being used instead of Arial.

You can see where this logic is coming from using fc-match.

fc-match Helvetica
#Helvetica-Compressed.otf: "Helvetica Compressed" "Regular"

You can very easily test this by creating a dummy webpage, and styling it to use the same CSS rules specified above:

<html>
<style>
body {
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}
</style>
<body>
Some text to be rendered using the font-family rule specified above.
</body>
</html>