I'm trying to write a little script to globally update my qubes templates.
It should work more or less like this:
- It prepares a window layout for i3, so that all the opening terminals from the various templates will occupy the right place in a dedicated desktop;
- Then it launches the terminal in every template vm, feeding it a nice 'sudo dnf update'
- When the update is finished, one should have the chance to close the vm by pressing enter like it happens now on qubes manager.
I already implemented the first point (window layout) but I'm having problems at launching the terminals in the right way. I'm basically passing to the vm commands like 'xterm -e "sudo dnf update"', but what happens is that the terminal opens up, checks for updates and then closes without giving me the chance to say y/n.
As I mentioned above, in qubes manager when one clicks on "update vm" a nice terminal window opens up, does everything it has to do and then asks you if you want to shutdown the vm or not by pressing enter or control+c, respectively, if I remember well.
Since I would really like to have a similar feature in my script, I am wondering if qubes-manager calls some script to behave like it does.
If this is the case, I could just call the same script once for every template and solve my problems without struggle.
Thanks for your Time,
Fab