How to open a file interactively in the desired VM

This for opening inline HTML emails in the desired VM from a terminal-based email client (Mutt, Neomutt, etc). If the email is from, say, Facebook, I open it in social-vm. If it’s from my bank, I open it in banking-vm. And so on.

In /usr/local/etc/mailcap of email-vm:

text/html; qvm-open-in-vm --view-only -- dummy-vm '%s'; test=test -n "$DISPLAY"; nametemplate=%s.html

dummy-vm must not exist. Since dummy-vm does not exist, qvm-open-in-vm will show a prompt for you to choose the VM where to open the HTML file.

@default can be used for this purpose. It’s the fallback for a nonexistent target VM:

[user@dom0 ~]$ journalctl -u qubes-qrexec-policy-daemon -o cat
[...]
qrexec: target 'dummy-vm' does not exist, using @default instead
1 Like