Re: [qubes-users] Global updates question
Thanks everyone, that code does exactly what I wanted. Calling bash /etc/qubes-rpc/qubes.InstallUpdatesGUI with qvm-run for a given VM produces the same result of uptating the VM via qubes-manager. Thanks for your Time, Fab T On Fri, Feb 17, 2017 at 4:18 AM, Jean-Philippe Ouellet wrote: > On Thu, Feb 16, 2017 at 10:51 PM, Fabrizio Romano Genovese > wrote: > > Well, I have considered it, yes, and it's true that launching many > terminals > > can be resource intensive. But it's also faster: Using & I can launch > all > > the terminals at the same time, while cycling as in the script you > linked I > > should wait for the previous update process to finish. > > Not if you just background the process, like: > > for dom in templateA templateB ...; do > qvm-run -p -u root some-template 'dnf update' & > done > > Anyway... the code you're looking for is here: > https://github.com/QubesOS/qubes-core-agent-linux/blob/ > master/qubes-rpc/qubes.InstallUpdatesGUI > -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/CAAZqLaPKZ0T5dgFhgSJo-kR2zwq1BUtY3S5YNmH0nCBcb6VC-A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [qubes-users] Global updates question
On Thu, Feb 16, 2017 at 10:51 PM, Fabrizio Romano Genovese wrote: > Well, I have considered it, yes, and it's true that launching many terminals > can be resource intensive. But it's also faster: Using & I can launch all > the terminals at the same time, while cycling as in the script you linked I > should wait for the previous update process to finish. Not if you just background the process, like: for dom in templateA templateB ...; do qvm-run -p -u root some-template 'dnf update' & done Anyway... the code you're looking for is here: https://github.com/QubesOS/qubes-core-agent-linux/blob/master/qubes-rpc/qubes.InstallUpdatesGUI -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/CABQWM_DeDSNuuqvNN4NgAmLM21SnpPgmSR%3DccB03z--8R%2Bs1jQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [qubes-users] Global updates question
Well, I have considered it, yes, and it's true that launching many terminals can be resource intensive. But it's also faster: Using & I can launch all the terminals at the same time, while cycling as in the script you linked I should wait for the previous update process to finish. Moreover, I confess that staring at the terminals for 5 mins every couple of days relaxes me, so I like it better :) Anyway I feel like I'm missing something, what I want to do doesn't look so difficult and I'm not sure why it doesn't work! Cheers, Fab On Fri, Feb 17, 2017 at 2:50 AM, Andrew David Wong wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 2017-02-16 18:20, Fabrizio Romano Genovese wrote: > > Hello all, > > > > 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 > > > > Have you considered not starting terminals in the TemplateVMs? By > using --pass-io and not starting the GUI of each TemplateVM, you can > save resources and hassle. Here's an example: > > https://gist.github.com/andrewdavidwong/d0b109186de65835255d467ae103c289 > > - -- > Andrew David Wong (Axon) > Community Manager, Qubes OS > https://www.qubes-os.org > -BEGIN PGP SIGNATURE- > > iQIcBAEBCgAGBQJYpmTdAAoJENtN07w5UDAwIhkP/R81vgO979DTCObP/hKE2E5h > 0m5ewGt3TH1Ing51Ueiws8PoYdNDyAkPogdXG4cQZX4a4kMzyzEjJ/zzEzddzoDQ > 32uFSYzEq7el+eoKyS+OiYiniFlDy4RFAIsjDndkiC+ZPGbfEcvgrrzvm7Ggdcvt > cD+ZGJaoVOuoN6bRRqNkE73VAkSFoIG0LOeaK/keqJwZobQo28UdMYtvsGvONsDR > 2vWjDO0jT1K0UEsp0eYuqWDN9B8Ihzw+dYDhSzbKrF3nMGPNXxjcE4edsVdmvL6m > LzCRisoi2k+C+w/AMFjHNjmxTUrx+Gw2/YoytWsXFrCXUIJSr5g/kWyoqVdKVCtx > hwOxVFQQdTDJFUl5vbb+9CvAjc6EXddASslyfXXC3iB1mEAy7ATHvSsMiIup/Lx9 > mj2HUk3X6j8uxALo1/+31cqfegEYpuXRtYxRz8sRxFlo9AYDRRNGKgWIn9OJgxl8 > 6mZ/Cfj2qPDttKvPsYhtvUftiTALzy5g5wZLzQh6SEWCizwkR7dUxeX5k/XMWREg > 9d4WgN2zQ3kTN2FtgNFhd37T/O5z4MZoXWMgcwGW3ZgygGNeO9g+t+OqAYypaHQZ > 4I0iCIhZTaOC74x0o2yiGd6IKnWLHFXJj+igOKmRve1KE/x0e+EMgahcsKnY0dbM > OmaMAnd1i7oT+ngnDdSJ > =X6k5 > -END PGP SIGNATURE- > > -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/CAAZqLaPzjjwqchAfk3RXMBX6ff5yMdvW8cuKF3abTbEjYd053g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [qubes-users] Global updates question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2017-02-16 18:20, Fabrizio Romano Genovese wrote: > Hello all, > > 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 > Have you considered not starting terminals in the TemplateVMs? By using --pass-io and not starting the GUI of each TemplateVM, you can save resources and hassle. Here's an example: https://gist.github.com/andrewdavidwong/d0b109186de65835255d467ae103c289 - -- Andrew David Wong (Axon) Community Manager, Qubes OS https://www.qubes-os.org -BEGIN PGP SIGNATURE- iQIcBAEBCgAGBQJYpmTdAAoJENtN07w5UDAwIhkP/R81vgO979DTCObP/hKE2E5h 0m5ewGt3TH1Ing51Ueiws8PoYdNDyAkPogdXG4cQZX4a4kMzyzEjJ/zzEzddzoDQ 32uFSYzEq7el+eoKyS+OiYiniFlDy4RFAIsjDndkiC+ZPGbfEcvgrrzvm7Ggdcvt cD+ZGJaoVOuoN6bRRqNkE73VAkSFoIG0LOeaK/keqJwZobQo28UdMYtvsGvONsDR 2vWjDO0jT1K0UEsp0eYuqWDN9B8Ihzw+dYDhSzbKrF3nMGPNXxjcE4edsVdmvL6m LzCRisoi2k+C+w/AMFjHNjmxTUrx+Gw2/YoytWsXFrCXUIJSr5g/kWyoqVdKVCtx hwOxVFQQdTDJFUl5vbb+9CvAjc6EXddASslyfXXC3iB1mEAy7ATHvSsMiIup/Lx9 mj2HUk3X6j8uxALo1/+31cqfegEYpuXRtYxRz8sRxFlo9AYDRRNGKgWIn9OJgxl8 6mZ/Cfj2qPDttKvPsYhtvUftiTALzy5g5wZLzQh6SEWCizwkR7dUxeX5k/XMWREg 9d4WgN2zQ3kTN2FtgNFhd37T/O5z4MZoXWMgcwGW3ZgygGNeO9g+t+OqAYypaHQZ 4I0iCIhZTaOC74x0o2yiGd6IKnWLHFXJj+igOKmRve1KE/x0e+EMgahcsKnY0dbM OmaMAnd1i7oT+ngnDdSJ =X6k5 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/bebfe6ed-4e4f-b853-ce30-4e6d576f4de0%40qubes-os.org. For more options, visit https://groups.google.com/d/optout.
[qubes-users] Global updates question
Hello all, 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 -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/bfd89968-9bb5-464c-a091-0f7f2e229ef1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.