Opening URLs/files in other Qubes

Other files open fine in dispVMs, but when I try to open a PDF file in a dispVM, it starts up and then asks: “Are you sure you want to create another disposable VM?” If I click yes, it starts another dispVM, and that VM asks the same question again, continuing the loop. If I click no, all opened dispVMs shut down, and the file doesn’t open.

Any Idea why this is happening?

I suppose you are talking about the link under “Further reading” (I changed it, as the community documentation moved to the forums).

You have two options: use a named disposable or use ask in your policies in order to select an already opened disposable.

1 Like

What happens if you manually start the 2nd disposable? Maybe your mimeapps.list is the same on this disposable, ending in a recursion loop? The disposables used to open a file or URL need a regular mimeapps.list.

1 Like

It’s only happening with PDF files; other files open fine. Additionally, it’s only an issue with the whonix-workstation-17-dvm. If I use the default-dvm template, it works fine. I checked .local/share in the Whonix DVM but couldn’t find any MIME file, or I don’t know where to look.

If I choose to ask, I’ll have to manually select the already open DVM, but I don’t want that. How do I specify a named disposable in the open-in-dvm.desktop file?

Replace the relevant bit with:

Exec=/usr/bin/qrexec-client-vm @dispvm:your-dvm qubes.OpenInVM
1 Like

Apparently, dom0 is not accepting the named DVM for this purpose.

I created a named DVM and used default-dvm as its template.

However, when I tried to set it as the default disposable template in my AppVM settings, it wasn’t listed. So, I set default-dvm as the default template.

Then, I attempted to add an exception in the “Open in Disposable Template” section of the global configuration to allow my AppVM to use this named DVM as its disposable VM, but it wasn’t listed there either.

I manually added it in the raw policy file, but qubes.OpeninVM was still denied from my AppVM to the named DVM.

Sadly, it’s as you concluded. Named disposables cannot be set as the disposable template.

But you should be able to do via policy files.
Can you paste here the policy you used?

Here it is:

qubes.OpenInVM * anon-whonix @dispvm allow target=@dispvm:watch-dvm

This is working for me. You can check the issue in dom0 by running: sudo journalctl -f -u qubes-qrexec-policy-daemon and trying to run the open-in-dvm again.

Also, can you confirm that watch-dvm is set as a disposable template in the settings? That could be the issue here.

I should also note that my original understanding was that you wanted to open in a named disposable / named-dvm, rather than an unnamed disposable. But by having target=@dispvm:watch-dvm it will result in an unnamed one.

The only other caveat here that I must say is for you to be careful because it is a whonix-vm and if the watch-vm is not Tor-networked, it could let someone leak your IP address.

The watch-vm is offline and does not have any NetVM.

If using target=@dispvm:watch-dvm results in an unnamed one, how can I open files in a named DVM?

Previously, I created a dispVM with the default-dvm template. I have now deleted it and created a new AppVM with this name, making it a disposable template. Now, when I try to open a file in dispVM, qubes.OpenInVM asks for the target VM.

I have the following in the open-in-dvm.desktop file:

[Desktop Entry]
Type=Application
Version=1.0
Name=Open in Disposable VM
Comment=Open file in a Disposable VM
TryExec=/usr/bin/qvm-open-in-vm
Exec=/usr/bin/qrexec-client-vm @dispvm:watch-dvm qubes.OpenInVM
Terminal=false
Categories=Qubes;Utility;