Editing PDF with Okular in disposable does not save the modified file back to the original VM

Most of the time I just open a PDF to read it. Sometimes I need to edit it.

From Midnight Commander I can choose between “open” and “edit”.

To just open (read) a PDF, I configured Midnight Commander to run this command:

qvm-open-in-dvm --view-only – %s

To edit a PDF, I configured Midnight Commander to run this command:

qvm-open-in-vm – @dispvm:edit-dvm %s

For the second command, okular is opened, but whatever changes I make, and save, are not sent back to the original VM.

What am I doing wrong?

It most likely copies the file you want to work with to /home/user/QubesIncoming in the dispvm it launches, and then uses your tool to work with the file. Your tool is not “aware” its in Qubes and just saves to /home/user/QubesIncoming. When you are done editing it, open a shell in that dispvm and use qvm-copy to copy the file back to the original VM.

Shouldn’t Qubes copy back the file to the original VM automatically? Is this and bug?

<removed because it contained incorrect information>

It exists and it is the default for qvm-open-in-(d)vm without --view-only.

The feature also doesn’t use the filecopy protocol, so ~/QubesIncoming/ is not involved.

Oi! I am very sorry then! I did not know that xD Thank you for correcting me, I’ll update this from my post so the next person doesn’t stumble over it.

I just removed the whole post, was nonsense.

I might be misunderstanding the intention of the developers, but I thought qvm-open-in-dvm without --viewonly was precisely for this use case.

It is.

As to your original question, “What am I doing wrong”, I dont know.
Despite the number of comments you havent provided sufficient
information.

I can tell you that the process works exactly as expected with Debian
templates.
What template is used for the sender?
What template is used for the edit-dvm qube?
Is edit-dvm set as the default_dvm for the sender?
How have you configured xdg-mime in the edit-dvm?

  1. What is the result of qvm-open-in-vm edit-dvm PDF_FILE ?
  2. What is the result of qvm-open-in-dvm PDF_FILE ?
  3. If you configure mc to process PDF with Open=(qvm-open-in-vm test %f) what is the result?
I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.