2016-05-22 07:28:40 -04:00
---
2021-03-13 13:06:18 -05:00
lang: en
2016-05-22 07:28:40 -04:00
layout: doc
permalink: /doc/i3/
redirect_from:
- /en/doc/i3/
2021-03-13 12:42:50 -05:00
- /doc/UserDoc/i3/
- /wiki/UserDoc/i3/
2021-03-13 13:06:18 -05:00
ref: 183
2021-03-13 12:42:50 -05:00
title: i3
2016-05-22 07:28:40 -04:00
---
2016-05-30 04:42:53 -04:00
# i3 installation in dom0
2016-05-22 07:28:40 -04:00
2018-11-19 17:49:51 -05:00
i3 is part of the stable repository (as of Qubes R3.1) and can be installed by
using the [dom0 update mechanism ](/doc/software-update-dom0/ ). To install the i3
window manager and the its Qubes specific configuration:
2016-05-30 04:42:53 -04:00
2021-03-13 12:03:23 -05:00
```shell_session
$ sudo qubes-dom0-update i3 i3-settings-qubes
```
2018-11-19 17:49:51 -05:00
The Qubes-specific configuration (package `i3-settings-qubes` ) can be installed
optionally in case you would prefer writing your own configuration (see
[customization ](#customization ) section for scripts and configuration).
2016-05-30 04:42:53 -04:00
That's it. After logging out, you can select i3 in the login manager.
2018-11-19 17:49:51 -05:00
### Customization
2020-07-11 01:56:24 -04:00
**Caution:** The following external resources may not have been reviewed by the Qubes team.
2018-11-19 17:49:51 -05:00
* [xdg_autostart_script ](https://gist.github.com/SietsevanderMolen/7b4cc32ce7b4884513b0a639540e454f )
* [i3bar_script ](https://gist.github.com/SietsevanderMolen/e7f594f209dfaa3596907e427b657e30 )
* [terminal_start_script ](https://gist.github.com/SietsevanderMolen/7c6f2b5773dbc0c08e1509e49abd1e96 )
* [i3 config with dmenu-i3-window-jumper ](https://github.com/anadahz/qubes-i3-config/blob/master/config )
2020-07-10 23:14:08 -04:00
* [dmenu script to open a terminal in a chosen VM ](https://gist.github.com/dmoerner/65528941dd20b05c98ee79e92d7e0183 )
2018-11-19 17:49:51 -05:00
2016-05-30 04:42:53 -04:00
## Compilation and installation from source
Note that the compilation from source is done in a Fedora based domU (could
2016-05-23 18:50:02 -04:00
be dispvm). The end result is always an `.rpm` that is copied to dom0 and then
2016-05-22 07:28:40 -04:00
installed through the package manager.
2016-05-30 04:42:53 -04:00
### Getting the code
2016-05-22 07:28:40 -04:00
Clone the i3-qubes repository here:
2021-03-13 12:03:23 -05:00
```shell_session
$ git clone https://github.com/QubesOS/qubes-desktop-linux-i3
```
2016-05-22 07:28:40 -04:00
In this case, the most interesting file is probably
`i3/0001-Show-qubes-domain-in-non-optional-colored-borders.patch` It's the patch
with changes that are necessary to make i3 work nicely with Qubes OS. The code
should not need much explanation, it just gets the vmname and label from Qubes
OS and changes some defaults so the user can't override decisions.
If you want to make any changes to the package, this is the time and place to do
it.
2016-05-30 04:42:53 -04:00
### Building
2016-05-22 07:28:40 -04:00
You'll need to install the build dependencies, which are listed in
2018-11-19 17:49:51 -05:00
build-deps.list. You can verify them and then install them with:
2016-05-22 07:28:40 -04:00
2021-03-13 12:03:23 -05:00
```shell_session
$ sudo dnf install -y $(cat build-deps.list)
```
2016-05-22 07:28:40 -04:00
This used to be more complicated, but I finally redid this and use the same
buildsystem that's used by Qubes OS for XFCE. It's just a Makefile that helps
you get the sources and start off the build:
2021-03-13 12:03:23 -05:00
```shell_session
$ make get-sources
$ make verify-sources
$ make rpms
```
2016-05-22 07:28:40 -04:00
2016-05-30 04:42:53 -04:00
### Installing
**Warning**: Manually installing software in dom0 is inherently risky, and the method described here circumvents the usual security mechanisms of qubes-dom0-update.
2016-05-22 07:28:40 -04:00
You should now have your i3 rpm in `./rpm/x86_64/i3-4.8-3.fc20.x86_64.rpm` .
2016-05-23 18:50:02 -04:00
Protip: copying this file to `~/i3.rpm` now will save you some typing in the
next step.
2016-05-22 07:28:40 -04:00
Now in dom0, copy in the rpm:
2021-03-13 12:03:23 -05:00
```shell_session
$ qvm-run --pass-io < src_domain > 'cat < /path/to/rpm_in_src_domain>' > i3.rpm
```
2016-05-22 07:28:40 -04:00
Now that the rpm is in dom0 we can proceed with installing it. i3 has some
dependencies that we can easily install with:
2021-03-13 12:03:23 -05:00
```shell_session
$ sudo qubes-dom0-update perl-AnyEvent-I3 xorg-x11-apps \\
rxvt-unicode xcb-util-wm perl-JSON-XS xcb-util-cursor \\
dzen2 dmenu xorg-x11-fonts-misc libev
```
2016-05-22 07:28:40 -04:00
2018-11-19 17:49:51 -05:00
After that you can just install the generated rpm like any other local package:
2016-05-22 07:28:40 -04:00
2021-03-13 12:03:23 -05:00
```shell_session
$ sudo yum localinstall i3.rpm
```
2016-05-22 07:28:40 -04:00
Log out, select i3, then log in again.