How to open a file interactively in the desired VM

Original forum link
https://forum.qubes-os.org/t/32560
Original poster
gasull
Created at
2025-03-01 14:02:56
Posts count
2
Likes count
1

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.