4.4 KiB
layout | title | permalink | redirect_from | ||||
---|---|---|---|---|---|---|---|
doc | i3 | /doc/i3/ |
|
i3 installation in dom0
i3 is part of the testing repository (as of Qubes R3.1) and can be installed from there using the dom0 update mechanism.
$ sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing i3
Qubes-specific configuation is available in a separate package and can be installed optionally. Otherwise you can write your own configuration (see below).
$ sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing i3-settings-qubes
That's it. After logging out, you can select i3 in the login manager.
Compilation and installation from source
Note that the compilation from source is done in a Fedora based domU (could
be dispvm). The end result is always an .rpm
that is copied to dom0 and then
installed through the package manager.
Getting the code
Clone the i3-qubes repository here:
$ git clone https://github.com/SietsevanderMolen/i3-qubes.git
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.
Building
You'll need to install the build dependencies, which are listed in build-deps.list. You can verify them and then install them with
$ sudo dnf install -y $(cat build-deps.list)
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:
$ make rpms
Installing
Warning: Manually installing software in dom0 is inherently risky, and the method described here circumvents the usual security mechanisms of qubes-dom0-update.
You should now have your i3 rpm in ./rpm/x86_64/i3-4.8-3.fc20.x86_64.rpm
.
Protip: copying this file to ~/i3.rpm
now will save you some typing in the
next step.
Now in dom0, copy in the rpm:
$ qvm-run --pass-io <src_domain> 'cat </path/to/rpm_in_src_domain>' > i3.rpm
Now that the rpm is in dom0 we can proceed with installing it. i3 has some dependencies that we can easily install with:
$ 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
After that you can just install the generated rpm like any other local package
$ sudo yum localinstall i3.rpm
Log out, select i3, then log in again.
Configuration
Warning: Be careful when writing configuration/scripts for the dom0. A script which communicates with the qubes VMs could potentially open a security hole.
Things needed/recommended to be done:
-
Create a script to start all entries in the xdg autostart directory. This is necessary to bring transient vm's up and restore state.
-
Change dmenu to i3-dmenu-desktop in the i3 configuration file. This respects xdg desktop files and gives you a good way of starting programs in specific domains.
-
Install i3status or use a different kind of script to drive i3bar.
-
You could install and bind tools to change backlight and volume levels in i3's config. You could also run kmix and xfce4-power-manager, which are part of a normal Qubes installation, and bind the keys for you.
-
Qubes does automatic screen locking and so should you. Install
xautolock
andi3lock
in dom0 and then addexec --no-startup-id "xautolock -detectsleep -time 3 -locker 'i3lock -d -c 000000' -notify 30 -notifier \"notify-send -t 2000 'Locking screen in 30 seconds'\""
to your i3 config to enable it.
-
By default
$mod+Return
in i3 will open a new terminal in dom0. If you prefer to start a new terminal in the domain of the currently active window, use a script like this.