Idea: qvm-shortcut CLI tool

29 views
Skip to first unread message

Peter Thurner

unread,
Mar 29, 2017, 9:32:58 AM3/29/17
to qubes...@googlegroups.com
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

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

Grzesiek Chodzicki

unread,
Mar 29, 2017, 2:10:22 PM3/29/17
to qubes-devel, p.th...@blunix.org

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?

Peter Thurner

unread,
Mar 29, 2017, 5:33:17 PM3/29/17
to qubes-devel
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.
Reply all
Reply to author
Forward
0 new messages