On Sat, May 30, 2020 at 12:11:31PM +0200,
dhorf-hfre...@hashmail.org wrote:
There's a simpler route, which I often use for template changes like
this, without need for reboot. Almost foolproof.
Make sure the new template has the necessary packages installed, and
then use a basic script to shutdown sys-usb, change template and
restart sys-usb. Use sleep to ensure sys-usb is down before you try to
change the template.
Put in a `sleep 120` statement, and then revert the change : that will
give you long enough to check that your keyboard/mouse are working
properly with the new configuration.
If all goes well, delete the sleep and reversion lines, and then run the
script again. If not, correct whatever is wrong and test again.
Something like:
```
#!/usr/bin/bash
qvm-shutdown sys-usb
sleep 10
qvm-prefs sys-usb template <NEW_TEMPLATE>
qvm-start sys-usb
## Delete this section after testing
sleep 120
qvm-shutdown sys-usb
sleep 10
qvm-prefs sys-usb template <OLD_TEMPLATE>
sleep 5
qvm-start sys-usb
## Delete this section after testing
```
You could use salt too, of course, but KISS
unman