From c055f21f685785010c3c094df7596ba7b08dbfc2 Mon Sep 17 00:00:00 2001 From: Andrew David Wong Date: Sun, 26 Feb 2023 12:10:27 -0800 Subject: [PATCH] Update template switching instructions https://forum.qubes-os.org/t/17031 --- user/templates/templates.md | 68 +++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/user/templates/templates.md b/user/templates/templates.md index c953f84c..a20d4ce6 100644 --- a/user/templates/templates.md +++ b/user/templates/templates.md @@ -218,40 +218,58 @@ Please see [How to Reinstall a Template](/doc/reinstall-template/). ## Switching -When you install a new template or upgrade a clone of a template, it is -recommended that you switch everything that was set to the old template to the +When you install a new template or +[upgrade](/doc/how-to-update/#upgrading-to-avoid-eol) a template, it is +recommended that you switch everything that was using the old template to the new template: -1. Make the new template the default template. +1. Make the new or upgraded template the default template. In the App Menu, go + to Qubes Tools, then click on Qubes Global Settings. In the Qube Defaults + section, next to Template, select the new or upgraded template from the + drop-down list. Press OK. - ``` - Applications Menu -> System Tools -> Qubes Global Settings -> Default template - ``` +2. Base your [disposable templates](/doc/glossary/#disposable-template) on the + new template. In the App Menu, go to Qubes Tools, then click on Qube + Manager. In the Qube Manager, find your disposable templates. (By default, + they end in `-dvm`.) Right click, then click on Settings. Next to Template, + select your new or upgraded template from the drop-down list. Press OK. -2. If your keyboard or mouse is connected through `sys-usb`, switch `sys-usb` - to the new template. (Note that this is a single command to ensure that - `sys-usb` restarts. If it does not, you will not be able to use your USB - keyboard or mouse.) + - If you receive an error message because there are running + [disposables](/doc/glossary/#disposable) based on this disposable + template, and your only keyboard and mouse are *not* connected through a + [USB qube](/doc/usb-qubes/), or that USB qube is *not* a disposable, then + shut down all disposables based on the disposable template and try again. - ``` - [user@dom0 ~]$ qvm-shutdown --wait sys-usb; qvm-prefs sys-usb template ; qvm-start sys-usb - ``` + - If your only keyboard or mouse *are* connected through a USB qube, and + that USB qube *is* a disposable, then you will have to enter a special + command that shuts down all of your qubes, switches the USB qube's + disposable template to the new template, then starts the USB qube again. + In order to avoid being locked out of your system, you must be very + careful to enter this command without typos and with the correct + substitutions. -3. Base app qubes on the new template. + In the App Menu, click on Terminal Emulator. Type the command below, + substituting `` with the name of the + disposable template on which `sys-usb` is based, `` with the + name of the new or upgraded template, and `` with the name of + your USB qube. Other than these substitutions, make sure to enter the + command exactly as written. - ``` - Applications Menu -> System Tools -> Qubes Template Manager - ``` + ``` + qvm-shutdown --wait --all; qvm-prefs template ; qvm-start + ``` -4. Base the [disposable template](/doc/glossary/#disposable-template) on the new - template. + With substitutions, your command should look similar to this example. + (Warning: This is just an example. Do not attempt to use it.) - ``` - [user@dom0 ~]$ qvm-create -l red -t - [user@dom0 ~]$ qvm-prefs template_for_dispvms True - [user@dom0 ~]$ qvm-features appmenus-dispvm 1 - [user@dom0 ~]$ qubes-prefs default-dispvm - ``` + ``` + qvm-shutdown --wait --all; qvm-prefs fedora-01-dvm template fedora-02; qvm-start sys-usb + ``` + +3. Base your app qubes on the new template. In the App Menu, go to Qubes Tools, + then click on Qubes Template Manager. Select all the templates based on the + old template (shown in the Current column). Next to "Change all selected + to," select the new or upgraded template from the drop-down list. Press OK. ## Advanced