2014-03-27 16:10:39 +00:00
---
2021-03-13 19:06:18 +01:00
lang: en
2015-04-10 20:17:45 +00:00
layout: doc
2021-06-16 19:56:25 -07:00
permalink: /doc/config-files/
2015-09-22 09:02:22 +00:00
redirect_from:
2015-10-28 22:14:40 +00:00
- /en/doc/config-files/
2015-10-11 07:04:59 +00:00
- /doc/ConfigFiles/
2021-03-13 18:42:50 +01:00
- /doc/UserDoc/ConfigFiles/
- /wiki/UserDoc/ConfigFiles/
2021-03-13 19:06:18 +01:00
ref: 180
2021-07-09 01:06:41 +00:00
title: Config files
2014-03-27 16:10:39 +00:00
---
2018-06-12 21:50:03 -05:00
Qubes-specific VM config files
------------------------------
2014-03-27 16:10:39 +00:00
2020-05-16 00:11:17 +00:00
These files are placed in `/rw` , which survives a VM restart.
2021-03-13 18:03:23 +01:00
That way, they can be used to customize a single VM instead of all VMs based on the same template.
2016-07-20 20:26:17 +08:00
The scripts here all run as root.
2014-03-27 16:10:39 +00:00
2021-03-13 18:03:23 +01:00
- `/rw/config/rc.local` - script runs at VM startup.
2020-05-16 00:11:17 +00:00
Good place to change some service settings, replace config files with its copy stored in `/rw/config` , etc.
2018-03-10 00:58:43 +00:00
Example usage:
2014-03-27 16:10:39 +00:00
2015-09-27 01:00:33 +02:00
~~~
2014-03-27 16:10:39 +00:00
# Store bluetooth keys in /rw to keep them across VM restarts
2021-03-13 18:03:23 +01:00
rm -rf /var/lib/bluetooth
2014-03-27 16:10:39 +00:00
ln -s /rw/config/var-lib-bluetooth /var/lib/bluetooth
2015-09-27 01:00:33 +02:00
~~~
2014-03-27 16:10:39 +00:00
2019-06-06 16:35:08 +00:00
~~~
# Add entry to /etc/hosts
2019-11-13 23:15:02 +01:00
echo '127.0.0.1 example.com' >> /etc/hosts
2019-06-06 16:35:08 +00:00
~~~
2021-03-13 18:03:23 +01:00
- `/rw/config/qubes-ip-change-hook` - script runs in NetVM after every external IP change and on "hardware" link status change.
2016-07-20 20:26:17 +08:00
2021-06-18 01:55:53 -07:00
- In ProxyVMs (or app qubes with `qubes-firewall` service enabled), scripts placed in the following directories will be executed in the listed order followed by `qubes-firewall-user-script` at start up.
2021-03-13 18:03:23 +01:00
Good place to write custom firewall rules.
2018-03-10 00:58:43 +00:00
~~~
/etc/qubes/qubes-firewall.d
/rw/config/qubes-firewall.d
/rw/config/qubes-firewall-user-script
~~~
2021-03-13 18:03:23 +01:00
- `/rw/config/suspend-module-blacklist` - list of modules (one per line) to be unloaded before system goes to sleep.
The file is used only in a VM with PCI devices attached.
Intended for use with problematic device drivers.
2014-03-27 16:10:39 +00:00
2021-06-18 01:55:53 -07:00
- In NetVMs/ProxyVMs, scripts placed in `/rw/config/network-hooks.d` will be ran when configuring Qubes interfaces. For each script, the `command` , `vif` , `vif_type` and `ip` is passed as arguments (see `/etc/xen/scripts/vif-route-qubes` ). For example, consider a PV app qube `work` with IP `10.137.0.100` and `sys-firewall` as NetVM. Assuming it's Xen domain id is arbitrary `12` then, the following script located at `/rw/config/network-hooks.d/hook-100.sh` in `sys-firewall` :
2021-03-13 18:03:23 +01:00
2019-05-30 15:57:00 +02:00
~~~
#!/bin/bash
command="$1"
vif="$2"
vif_type="$3"
ip="$4"
if [ "$ip" == '10.137.0.100' ]; then
case "$command" in
online)
ip route add 192.168.0.100 via 10.137.0.100
;;
offline)
ip route del 192.168.0.100
;;
esac
fi
~~~
2020-05-16 00:16:34 +00:00
will be executed with arguments `online vif12.0 vif 10.137.0.100` when starting `work` . Please note that in case of an HVM, the script will be called twice - once with vif_type `vif` , then with vif_type `vif_ioemu` (and different interface names). As long as the ioemu interface exists, it should be preferred (up to the hook script). When the VM decides to use a PV interface (vif_type `vif` ), the ioemu one will be unplugged.
2019-05-30 15:57:00 +02:00
2020-05-16 00:11:17 +00:00
Note that scripts need to be executable (`chmod +x` ) to be used.
2014-05-05 10:37:09 +00:00
2021-06-18 01:55:53 -07:00
Also, take a look at [bind-dirs ](/doc/bind-dirs ) for instructions on how to easily modify arbitrary system files in an app qube and have those changes persist.
2016-09-15 13:37:06 +02:00
2014-05-05 10:37:09 +00:00
GUI and audio configuration in dom0
2018-06-12 21:50:03 -05:00
-----------------------------------
2014-05-05 10:37:09 +00:00
2020-05-16 00:11:17 +00:00
The GUI configuration file `/etc/qubes/guid.conf` in one of a few not managed by `qubes-prefs` or the Qubes Manager tool.
2018-02-13 13:03:21 +00:00
Sample config (included in default installation):
2014-05-05 10:37:09 +00:00
2015-09-27 01:00:33 +02:00
~~~
2014-05-05 10:37:09 +00:00
# Sample configuration file for Qubes GUI daemon
2020-07-07 09:50:15 -04:00
# For syntax go https://www.hyperrealm.com/libconfig/libconfig_manual.html
2014-05-05 10:37:09 +00:00
global: {
# default values
#allow_fullscreen = false;
2020-07-07 09:50:15 -04:00
#override_redirect_protection = true;
2014-05-05 10:37:09 +00:00
#allow_utf8_titles = false;
#secure_copy_sequence = "Ctrl-Shift-c";
#secure_paste_sequence = "Ctrl-Shift-v";
#windows_count_limit = 500;
2020-07-07 09:50:15 -04:00
#audio_low_latency = true;
2019-07-19 13:03:56 +05:30
#log_level = 1;
2019-07-15 05:44:13 +05:30
#trayicon_mode = "border1";
2020-07-07 09:50:15 -04:00
#startup_timeout = 45;
2014-05-05 10:37:09 +00:00
};
# most of setting can be set per-VM basis
VM: {
work: {
2020-07-07 09:50:15 -04:00
allow_utf8_titles = true;
2014-05-05 10:37:09 +00:00
};
video-vm: {
2020-07-07 09:50:15 -04:00
allow_fullscreen = true;
2014-05-05 10:37:09 +00:00
};
};
2015-09-27 01:00:33 +02:00
~~~
2014-05-05 10:37:09 +00:00
Currently supported settings:
2021-03-13 18:03:23 +01:00
- `allow_fullscreen` - allow VM to request its windows to go fullscreen (without any colorful frame).
2016-12-17 07:48:20 -08:00
2018-02-13 13:03:21 +00:00
**Note:** Regardless of this setting, you can always put a window into fullscreen mode in Xfce4 using the trusted window manager by right-clicking on a window's title bar and selecting "Fullscreen".
This functionality should still be considered safe, since a VM window still can't voluntarily enter fullscreen mode.
The user must select this option from the trusted window manager in dom0.
To exit fullscreen mode from here, press `alt` + `space` to bring up the title bar menu again, then select "Leave Fullscreen".
2016-07-21 14:59:06 +08:00
2021-03-13 18:03:23 +01:00
- `allow_utf8_titles` - allow the use of UTF-8 in window titles; otherwise, non-ASCII characters are replaced by an underscore.
2016-07-21 14:59:06 +08:00
2021-03-13 18:03:23 +01:00
- `secure_copy_sequence` and `secure_paste_sequence` - key sequences used to trigger secure copy and paste.
2016-07-21 14:59:06 +08:00
2021-03-13 18:03:23 +01:00
- `audio_low_latency` - force low-latency audio mode (about 40ms compared to 200-500ms by default).
Note that this will cause much higher CPU usage in dom0. It's enabled by
default, disabling it may save CPU in dom0.
2019-07-15 05:12:50 +05:30
2019-07-16 20:00:01 +05:30
- `trayicon_mode` - defines the trayicon coloring mode. Options are
2019-07-18 02:08:57 +05:30
- `bg` - color full icon background to the VM color
- `border1` - add 1px border at the icon edges
- `border2` - add 1px border 1px from the icon edges
- `tint` - tinttint icon to the VM color, can be used with additional
2021-03-13 18:03:23 +01:00
modifiers (you can enable multiple of them)
2019-07-18 02:08:57 +05:30
- `tint+border1,tint+border2` - same as tint, but also add a border
- `tint+saturation50` - same as tint, but reduce icon saturation by 50%
- `tint+whitehack` - same as tint, but change white pixels (0xffffff) to
2021-03-13 18:03:23 +01:00
almost-white (0xfefefe)
2019-07-16 20:00:01 +05:30
2020-05-16 00:16:34 +00:00
- `log level` - defines the log options logs can take. It can
have a value of 0 (only errors), 1 (some basic messages), and 2 (debug).
2019-07-15 05:12:50 +05:30
2019-07-15 05:44:13 +05:30
- `startup_timeout` - The timeout for startup.