summaryrefslogtreecommitdiff
path: root/INSTALL.asciidoc
blob: f81ef0b60ec954b35d38a40f9212372f7acc587c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
Installing qutebrowser
======================

On Debian / Ubuntu
------------------

qutebrowser should run on these systems:

* Debian jessie or newer
* Ubuntu Trusty (14.04 LTS) or newer
* Any other distribution based on these (e.g. Linux Mint 17+)

Unfortunately there is no Debian package in the official repos yet, but installing qutebrowser is
still relatively easy!

You can use packages that are built for every release or build it yourself from git.

Using the packages
~~~~~~~~~~~~~~~~~~

Install the dependencies via apt-get:

----
# apt-get install python3-lxml python-tox python3-pyqt5 python3-pyqt5.qtwebkit python3-sip python3-jinja2 python3-pygments python3-yaml
----

Get the packages from the https://github.com/The-Compiler/qutebrowser/releases[release page]

Install the packages:

----
# dpkg -i python3-pypeg2_*_all.deb
# dpkg -i qutebrowser_*_all.deb
----

Build it from git
~~~~~~~~~~~~~~~~~

Install the dependencies via apt-get:

[NOTE]
==========================
On Debian, it's recommended to install the Qt packages from the
https://wiki.debian.org/DebianExperimental[experimental] repository as those
are a much newer version of Qt which is more stable.

Add the following line to your `/etc/apt/sources.list`:

----
deb http://ftp.debian.org/debian experimental main
----

Then install the packages like this:

----
# apt-get update
# apt-get install -t experimental python3-pyqt5 python3-pyqt5.qtwebkit python3-sip python3-dev
# apt-get install python-tox
----

It's also recommended to pin those packages to receive updates by creating a
file `/etc/apt/preferences.d/qutebrowser` with the following contents:

----
Package: python3-pyqt5* libqt5*
Pin: release a=experimental
Pin-Priority: 800
----
==========================

For distributions other than Debian or if you prefer to not use the
experimental repo:

----
# apt-get install python3-pyqt5 python3-pyqt5.qtwebkit python-tox python3-sip python3-dev
----

To generate the documentation for the `:help` command, when using the git
repository (rather than a release):

----
# apt-get install asciidoc source-highlight
$ python3 scripts/asciidoc2html.py
----

If video or sound don't seem to work, try installing the gstreamer plugins:

----
# apt-get install gstreamer1.0-plugins-{bad,base,good,ugly}
----

Then <<tox,install qutebrowser via tox>>.

On Fedora
---------

qutebrowser is available in the official repositories for Fedora 22 and newer.

----
# dnf install qutebrowser
----

On Archlinux
------------

qutebrowser is available in the official [community] repository.

----
# pacman -S qutebrowser
----

There is also a -git version available in the AUR:
https://aur.archlinux.org/packages/qutebrowser-git/[qutebrowser-git].

You can install it using `makepkg` like this:

----
$ git clone https://aur.archlinux.org/qutebrowser-git.git
$ cd qutebrowser-git
$ makepkg -si
$ cd ..
$ rm -r qutebrowser-git
----

or you could use an AUR helper, e.g. `yaourt -S qutebrowser-git`.

If video or sound don't seem to work, try installing the gstreamer plugins:

----
# pacman -S gst-plugins-{base,good,bad,ugly} gst-libav
----

On Gentoo
---------

qutebrowser is available in the main repository and can be installed with:

----
# emerge -av qutebrowser
----

Make sure you have `python3_4` in your `PYTHON_TARGETS`
(`/etc/portage/make.conf`) and rebuild your system (`emerge -uDNav @world`) if
necessary.

If video or sound don't seem to work, try installing the gstreamer plugins:

----
# emerge -av gst-plugins-{base,good,bad,ugly,libav}
----


On Void Linux
-------------

qutebrowser is available in the official repositories and can be installed
with:

----
# xbps-install qutebrowser
----

On NixOS
--------

Nixpkgs collection contains `pkgs.qutebrowser` since June 2015. You can install
it with:

----
$ nix-env -i qutebrowser
----

On openSUSE
-----------

There are prebuilt RPMs available for Tumbleweed and Leap 42.1:

http://software.opensuse.org/download.html?project=home%3Aarpraher&package=qutebrowser[One Click Install]

Or add the repo manually:

----
# zypper addrepo http://download.opensuse.org/repositories/home:arpraher/openSUSE_Tumbleweed/home:arpraher.repo
# zypper refresh
# zypper install qutebrowser
----

On Windows
----------

There are different ways to install qutebrowser on Windows:

Prebuilt binaries
~~~~~~~~~~~~~~~~~

Prebuilt standalone packages and MSI installers
https://github.com/The-Compiler/qutebrowser/releases[are built] for every
release.

https://chocolatey.org/packages/qutebrowser[Chocolatey package]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* PackageManagement PowerShell module
----
PS C:\> Install-Package qutebrowser
----
* Chocolatey's client
----
C:\> choco install qutebrowser
----

Manual install
~~~~~~~~~~~~~~

* Use the installer from http://www.python.org/downloads[python.org] to get
Python 3 (be sure to install pip).
* Use the installer from
http://www.riverbankcomputing.com/software/pyqt/download5[Riverbank computing]
to get Qt and PyQt5.
* Install https://testrun.org/tox/latest/index.html[tox] via
https://pip.pypa.io/en/latest/[pip]:

----
$ pip install tox
----

Then <<tox,install qutebrowser via tox>>.

On OS X
-------

To install qutebrowser on OS X, you'll want a package manager, e.g.
http://brew.sh/[Homebrew] or https://www.macports.org/[MacPorts].

For Homebrew, a few extra steps are necessary since Homebrew dropped QtWebKit
from Qt 5.6.

This installs a Qt 5.5 and symlinks it so PyQt5 will work with it instead of Qt
5.6. This requires that `qt5` is not installed via Homebrew:

----
$ brew install python3 d-bus mysql sip xz
$ brew install homebrew/versions/qt55
$ brew install --ignore-dependencies pyqt5
$ ln -s /usr/local/opt/qt55 /usr/local/opt/qt5

$ pip3.5 install qutebrowser
----

For MacPorts, run:

----
$ sudo port install python34 py34-jinja2 asciidoc py34-pygments py34-pyqt5
$ sudo pip3.4 install qutebrowser
----

The preferences for qutebrowser are stored in
`~/Library/Preferences/qutebrowser`, the application data is stored in
`~/Library/Application Support/qutebrowser`.

Packagers
---------

There are example .desktop and icon files provided. They would go in the
standard location for your distro (`/usr/share/applications` and
`/usr/share/pixmaps` for example).

The normal `setup.py install` doesn't install these files, so you'll have to do
it as part of the packaging process.

[[tox]]
Installing qutebrowser with tox
-------------------------------

First of all, clone the repository using http://git-scm.org/[git] and switch
into the repository folder:

----
$ git clone https://github.com/The-Compiler/qutebrowser.git
$ cd qutebrowser
----


Then run tox inside the qutebrowser repository to set up a
https://docs.python.org/3/library/venv.html[virtual environment]:

----
$ tox -e mkvenv
----

This installs all needed Python dependencies in a `.venv` subfolder. The
system-wide Qt5/PyQt5 installations are symlinked into the virtual environment.

You can then create a simple wrapper script to start qutebrowser somewhere in
your `$PATH` (e.g. `/usr/local/bin/qutebrowser` or `~/bin/qutebrowser`):

----
#!/bin/bash
~/path/to/qutebrowser/.venv/bin/python3 -m qutebrowser "$@"
----

If you are developing on qutebrowser, you may want to redirect it to a local
config:

----
#!/bin/bash
~/path/to/qutebrowser/.venv/bin/python3 -m qutebrowser -c .qutebrowser-local "$@"
----

Updating
~~~~~~~~

When you updated your local copy of the code (e.g. by pulling the git repo, or
extracting a new version), the virtualenv should automatically use the updated
code. However, if dependencies got added, this won't be reflected in the
virtualenv. Thus it's recommended to run the following command to recreate the
virtualenv:

----
$ tox -r -e mkvenv
----