Docu review done: Tue 17 Oct 2023 10:55:07 AM CEST
Table of Content
General
qutebrowser is a keyboard-focused browser with a minimal GUI. It’s based on Python and Qt5 and is free software, licensed under the GPL. It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
Installation
If you are running debian, you can easily install it with apt
like:
$ apt install qutebrowser
Aliases
Inside of qutebrowser you can create your own aliases which can help you in performing long commands way faster and easier.
You can configure your aliases in two different files:
qutebrowser/config.py
qutebrowser/config/autoconfig.yml
As I configure new changes of my qutebrowser always inside of it self, so get it stored in both ;) and it works like perfect which then goes into my automation to deploy it on all other clients.
Inside of qutebrowser, you would do it like this (sample with default aliases):
:set aliases '{"q": "close", "qa": "quit", "w": "session-save", "wq": "quit --save", "wqa": "quit --save", "my_new_alias": "qute_command with out starting double_dots"}'
Lets see how it is done in the files directly:
For qutebrowser/config.py
add the following line :
c.aliases = {'my_new_alias': 'qute_command with out starting double_dots', 'q': 'close', 'qa': 'quit', 'w': 'session-save', 'wq': 'quit --save', 'wqa': 'quit --save'}
For qutebrowser/config/autoconfig.yml
add a new item to the settings.alias
nested hash:
settings:
aliases:
global:
my_new_alias: qute_command with out starting double_dots
q: close
qa: quit
w: session-save
wq: quit --save
wqa: quit --save
Userscripts
Userscripts are executables files (executable permission required) which can be triggered by qutebrowser.
These allow you to run external commands/scripts on your local system and interact with your system and/or with qutebrowser.
Userscripts are loaced in your config/data directory, for example beneath ~/.local/share/qutebrowser/userscripts
or ~/.confg/qutebrowser/userscripts
.
If you want to define a global one, you can place it beneath /usr/share/qutebroswer/userscripts
.
For more details, please have a look in qute://help/userscripts.html (inside of qutebrowser).
Small helper scripts
showSSL
As qutebrowser is not able to display the certificates of the current homepage, we have created a small and simple script which can help out there.
This script will display you the certificate chain and also the certificate which got fetched from the destination.
One thing to mention: the script will create a separate connection to the domain, so it can be that the scripts connects to a different server as it could be that there is a round robin behind the domain or something else which would let you target a different TLS termination destination.
This is the content of the script ~/.config/qutebrowser/userscripts/showSSL
:
#!/bin/bash
tg_url=$(sed -E 's@https://([a-z0-9._-]+)/.*@\1@g' <<<"${QUTE_URL}")
ssl_data=$(echo | openssl s_client -connect ${tg_url}:443 -showcerts 2>/dev/null)
echo "${ssl_data}"
echo "$(openssl x509 -text <<<"${ssl_data}")"
echo "open -r -b qute://process/$$" >> "${QUTE_FIFO}"
To get the latest version of the script please have a look at https://gitea.sons-of-sparda.at/outerscripts/qutebrowser_scripts
As you can see, the script uses openssl, so please make sure you have it installed on your local client.
To make easy use of it, you can create an alias inside of qutebrowser, e.g: "showssl": "spawn --userscript showSSL"