-
What is qutebrowser based on?
qutebrowser uses Python, Qt and
PyQt.
The concept of it is largely inspired by dwb
and Vimperator. Many actions and
key bindings are similar to dwb.
-
Why another browser?
It might be hard to believe, but I didn’t find any browser which I was
happy with, so I started to write my own. Also, I needed a project to get
into writing GUI applications with Python and
Qt/PyQt.
Read the next few questions to find out why I was unhappy with existing
software.
-
What’s wrong with dwb/vimprobable/luakit/jumanji/… (projects based on WebKitGTK)?
Most of them are based on the WebKitGTK+
WebKit1 API,
which causes a lot of crashes. As the GTK API using WebKit1 is
deprecated,
these bugs are never going to be fixed.
When qutebrowser was created, the newer
WebKit2 API lacked
basic features like proxy support, and almost no projects have started porting
to WebKit2. In the meantime, this situation has improved a bit, but there are
still only a few projects which have some kind of WebKit2 support (see the
list of
alternatives).
qutebrowser uses Qt and
QtWebEngine by default (and supports
QtWebKit optionally). QtWebEngine is based on
Google’s Chromium. With an up-to-date Qt, it has
much more man-power behind it than WebKitGTK+ has, and thus supports more modern
web features - it’s also arguably more secure.
-
What’s the difference to Firefox/Chromium addons like Tridactyl or Vimium?
The WebExtensions API doesn’t seem to allow much freedom for plugin
writers, which results in Vimium/Tridactyl not really having all the
features you’d expect from a proper minimal, vim-like browser. Due to the
same reason, those addons are quite inconsistent - on some pages, they
can’t run and intercept keyboard inputs correctly. Tridactyl gets around
those limitations with various measures (such as a native messenger written
in Python doing some work which can’t be done from the addon directly), but
there’s only so much that can be done.
-
Why Python?
I enjoy writing Python since 2011, which made it one of the possible
choices. I wanted to use Qt because of
QtWebKit so I didn’t have
many other choices. At that
point, I wasn’t comfortable with C++ so that wasn’t an alternative.
-
But isn’t Python too slow for a browser?
It’s generally less of a problem than one would expect.
Most of the heavy lifting of qutebrowser is done by Qt and
QtWebKit/QtWebEngine in C++, with the
GIL released.
It can be problematic in some areas, but various performance optimizations have
been carried out to problematic portions of the code.
-
Is qutebrowser secure?
Most security issues are in the backend (which handles networking,
rendering, JavaScript, etc.) and not qutebrowser itself.
qutebrowser uses QtWebEngine by default.
QtWebEngine is based on Google’s Chromium. While
Qt only updates to a new Chromium release on every minor Qt release (all ~6
months), every patch release backports security fixes from newer Chromium
versions. In other words: As long as you’re using an up-to-date Qt, you should
be receiving security updates on a regular basis, without qutebrowser having to
do anything. Chromium’s process isolation and
sandboxing
features are also enabled as a second line of defense.
QtWebKit is also supported as an alternative
backend, but hasn’t seen new releases
in a while. It also doesn’t have any
process isolation or sandboxing. See
#4039 for more details.
Security issues in qutebrowser’s code happen very rarely (as per September 2019,
there have been three security issues caused by qutebrowser in almost 6 years).
Those were handled appropriately
(example) and fixed timely. To report
security bugs, please contact me directly at mail@qutebrowser.org, GPG ID
0x916eb0c8fd55a072.
-
Is there an adblocker?
There is a host-based adblocker which takes /etc/hosts-like lists. A "real"
adblocker has a
big
impact on browsing speed and
RAM
usage, so implementing support for AdBlockPlus-like lists is currently not
a priority.
-
How can I get No-Script-like behavior?
To disable JavaScript by default:
:set content.javascript.enabled false
The basic command for enabling JavaScript for the current host is tsh
.
This will allow JavaScript execution for the current session.
Use S
instead of s
to make the exception permanent.
With H
instead of h
, subdomains are included.
With u
instead of h
, only the current URL is whitelisted (not the whole host).
-
How do I play Youtube videos with mpv?
You can easily add a key binding to play youtube videos inside a real video
player - optionally even with hinting for links:
:bind ,m spawn mpv {url}
:bind ,M hint links spawn mpv {hint-url}
The comma prefix is used to make sure user-defined bindings don’t conflict with
the built-in ones.
Note that you might need an additional package (e.g.
youtube-dl on
Archlinux) to play web videos with mpv.
There is a very useful script for mpv, which emulates "unique application"
functionality. This way you can add links to the mpv playlist instead of
playing them all at once.
It also works nicely with rapid hints:
:bind ,m spawn umpv {url}
:bind ,M hint links spawn umpv {hint-url}
:bind ;M hint --rapid links spawn umpv {hint-url}
-
How do I use qutebrowser with mutt?
For security reasons, local files without .html
extensions aren’t
rendered as HTML, see
this Chromium issue
for details. You can do this in your mailcap
file to get a proper
extension:
text/html; qutebrowser %s; needsterminal; nametemplate=%s.html
-
What is the difference between bookmarks and quickmarks?
Bookmarks will always use the title of the website as their name, but with quickmarks
you can set your own title.
For example, if you bookmark multiple food recipe websites and use :open
,
you have to type the title or address of the website.
When using quickmark, you can give them all names, like
foodrecipes1
, foodrecipes2
and so on. When you type
:open foodrecipes
, you will see a list of all the food recipe sites,
without having to remember the exact website title or address.
-
How do I use spell checking?
Configuring spell checking in qutebrowser depends on the backend in use
(see #700 for
a more detailed discussion).
-
Install qtwebkit-plugins.
-
Note: with QtWebKit reloaded you may experience some issues. See
#10.
-
The dictionary to use is taken from the DICTIONARY
environment variable.
The default is en_US
. For example to use Dutch spell check set DICTIONARY
to nl_NL
; you can’t use multiple dictionaries or change them at runtime at
the moment.
(also see the README file for qtwebkit-plugins
).
-
Remember to install the hunspell dictionaries if you don’t have them already
(most distros should have packages for this).
-
Make sure your versions of PyQt and Qt are 5.8 or higher.
-
Use dictcli.py
script to install dictionaries.
Run the script with -h
for the parameter description.
-
Set spellcheck.languages
to the desired list of languages, e.g.:
:set spellcheck.languages "['en-US', 'pl-PL']"
-
How do I use Tor with qutebrowser?
Start tor on your machine, and do :set content.proxy socks://localhost:9050/
in qutebrowser. Note this won’t give you the same amount of fingerprinting
protection that the Tor Browser does, but it’s useful to be able to access
.onion
sites.
-
Why does J move to the next (right) tab, and K to the previous (left) one?
One reason is because dwb did it that way,
and qutebrowser’s keybindings are designed to be compatible with dwb’s.
The rationale behind it is that J is "down" in vim, and K is "up", which
corresponds nicely to "next"/"previous". It also makes much more sense with
vertical tabs (e.g. :set tabs.position left
).
-
What’s the difference between insert and passthrough mode?
They are quite similar, but insert mode has some bindings (like Ctrl-e
to
open an editor) while passthrough mode only has shift+escape bound. This is
because shift+escape is unlikely to be a useful binding to be passed to a
webpage. However, any other keys may be assigned to leaving passthrough mode
instead of shift+escape should this be desired.
-
Why does it take longer to open a URL in qutebrowser than in chromium?
When opening a URL in an existing instance, the normal qutebrowser
Python script is started and a few PyQt libraries need to be
loaded until it is detected that there is an instance running
to which the URL is then passed. This takes some time.
One workaround is to use this
script
and place it in your $PATH with the name "qutebrowser". This
script passes the URL via an unix socket to qutebrowser (if its
running already) using socat which is much faster and starts a new
qutebrowser if it is not running already.
-
How do I make qutebrowser use greasemonkey scripts?
There is currently no UI elements to handle managing greasemonkey scripts.
All management of what scripts are installed or disabled is done in the
filesystem by you. qutebrowser reads all files that have an extension of
.js
from the <data>/greasemonkey/
folder and attempts to load them.
Where <data>
is the qutebrowser data directory shown in the Paths
section of the page displayed by :version
. If you want to disable a
script just rename it, for example, to have .disabled
on the end, after
the .js
extension. To reload scripts from that directory run the command
:greasemonkey-reload
.
Troubleshooting: to check that your script is being loaded when
:greasemonkey-reload
runs you can start qutebrowser with the arguments
--debug --logfilter greasemonkey,js
and check the messages on the
program’s standard output for errors parsing or loading your script.
You may also see javascript errors if your script is expecting an environment
that we fail to provide.
Note that there are some missing features which you may run into:
-
Some scripts expect GM_xmlhttpRequest
to ignore Cross Origin Resource
Sharing restrictions, this is currently not supported, so scripts making
requests to third party sites will often fail to function correctly.
-
If your backend is a QtWebEngine version 5.8, 5.9 or 5.10 then regular
expressions are not supported in @include
or @exclude
rules. If your
script uses them you can re-write them to use glob expressions or convert
them to @match
rules.
See the wiki for more info.
-
Any greasemonkey API function to do with adding UI elements is not currently
supported. That means context menu extentensions and background pages.
-
How do I change the WM_CLASS
used by qutebrowser windows?
Qt only supports setting WM_CLASS
globally, which you can do by starting
with --qt-arg name foo
. Note that all windows are part of the same
qutebrowser instance (unless you use --temp-basedir
or --basedir
), so
they all will share the same WM_CLASS
.