How to viewdvm/editdvm non-plain text document in a specific - offline dvm with gui text editor

I’m trying to view/edit .csv (or any other type of not recognized as a plain text) file with any simple gui text editor (Mousepad, for example) in a dvm that would be offline.

Let’s say the file is in vault, and I’d like be able to achieve this via custom action context menu in vault’s thunar.
I have created a clone of a disposable template which netVm is set to none.

Is this possible and how?

I am aware it can be done manually by copying the file to dvm and view/edit it there, but I’d like to automate the process and spare a lot of time.

This is possible thanks to the QVM-OPEN-IN-DVM command as a way to edit your files. The .csv file might not recognize due to some codes of reading the file, improperly. For the netVM, it doesn’t interfere the file. As a result, this might need some troubleshoots or tweak some of the files of policies or rpc’s.

Thanks for the response, but it doesn’t look helpful.

The question was how to edit, for example, shell script that resides in vault with mousepad in a dvm, via custom action context menu command in vault’s thunar, or even with terminal command in vault.

At the moment, deafult custom action for view/edit in dvm is:

/usr/lib/qubes/ viewdvm/opendvm %F

But if I use this command against, it will try to execute it in dvm, not to edit it with any text editor.

Or, is there a way I could customize so I would be offered with additional options:

View in dvm with Mousepad
Edit in dvm with Mousepad

The part about offline dvm can be resolved by creating offline dvm template, and setting it as default disposable template for desired qubes, so the other part of the task needs advise.

Any help would be appreciated. Maybe @unman could help (please apologize for poking you)?

@brendanhoar always has some scripted solutions? Is this possible to achive via rpc policies?

I guess you need to configure your disposable template to not run .sh files but edit them.

Thanks @fsflover. I tried to find some info how would I do that, but to no avail. Any link would be highly appreciated, since I’m not expecting served solution and am willing to learn by myself.

(You need the opposite: editing script by double-clicking)

1 Like

Thanks a bunch @fsflover. Once I try this, will be back with a feedback.