On 03/29/2017 08:10 PM, Grzesiek Chodzicki wrote: > > > W dniu środa, 29 marca 2017 15:32:58 UTC+2 użytkownik Peter Thurner napisał: > > Hello Mailing List, > > I recently found qubes and already am a big fan! I tried one or two > things with the salt modules and came to a point where most of the > initial installation is automatable except for actually adding an > Application from Available to Selected. I mean this step using the UI: > > - Open the Qubes Manager UI > - Select any AppVM > - Go to Applications > - Select any Application > - Move it from Availale to Selected with the ">" Button > > The code seems to be here: > > > https://github.com/QubesOS/qubes-manager/blob/98cada9f07ec870b02e5f72cc3ae2e105c45a715/qubesmanager/appmenu_select.py#L67 > > <https://github.com/QubesOS/qubes-manager/blob/98cada9f07ec870b02e5f72cc3ae2e105c45a715/qubesmanager/appmenu_select.py#L67> > > > I'd like to propose the idea of building a cli tool, sth like > qvm-shortcut, similar to qvm-service, for this usecase. One could > execute it like: > > $ qvm-shortcut web-bank ls > Available: > Chromium > something_else > Selected: > xterm > > qvm-shortcut web-bank select Chromium someting_else > qvm-shortcut web-bank unselect xterm > > What do you guys think? Is there a better way to do this I did not > find? > > Otherwise if you have any hints / guidelines for implementation let me > know, I've been looking at qubes for a few days now so everything is > still quite new :) > > > With kind regards, > > > Peter Thurner > > > Applications shortcuts are just .desktop files placed in > /var/lib/qubes/appvms/APPVMNAME/ > Adding and removing them is a matter of creating a new file from a > template or removing them. Dunno where the template is kept (or if there > is one at all) but if all You need is setup automation perhaps You could > create those by hand?
I see! Thank you for the hint! When "activating" Applications for a specific VM, .desktop files are created - if I enable chromium-browser for a AppVM this would be in: /var/lib/qubes/appvms/<vm-name>/apps/<vm-name>-chromium-browser.desktop This file contains information like: Name=cshop: Chromium Web Browser I found a supposed template for this file in: /var/lib/qubes/vm-templates/<template-vm-name>/apps.templates/chromium-browser.desktop It contains information like: Name=%VMNAME%: Chromium Web Browser Setting the Files up by hand / small BASH script with some sed would be possible but doesnt seem like the ideal solution. With kind regards, Peter Thurner -- You received this message because you are subscribed to the Google Groups "qubes-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-devel/672924f8-2cc2-576d-13a4-ec47caceb0f5%40blunix.org. For more options, visit https://groups.google.com/d/optout.
