Okay, so I understand that moving data and files from less trusted domains (which is all of them) into dom0 is a bad idea.
But sometimes there’s good reason to do so. Actually good reason, not “I want a wallpaper”.
For example, trying to setup qubes-builderv2 - see this instruction:
In dom0 , copy rpc/policy/50-qubesbuilder.policy to /etc/qubes/policy.d
Pray tell, how is one supposed to do that, other than manually retyping every character of that file? Ctrl-Shift-V won’t paste into the dom0 clipboard, and qvm-copy doesn’t present dom0 as a copy option, nor does it allow the user to manually type in dom0.
The existing advice seem to be to use qvm-run --pass-io [origin cube] 'cat [origin path]' > [destination path] but this doesn’t work either! It always yields cat: [origin path]: No such file or directory
Gate it behind a magic keystroke, pop up a big flashing WARNING THIS IS REALLY DUMB message, I don’t care, but give me a way to get stuff into dom0!
Did you used full path from root in [origin path]?
Eg. /home/user/Downloads/rpc/policy or short psth provided in the guide as rpc/policy.
Short path from current directory wont work.
Yes, I used the full path. I think the qvm-run is being jailed or something. When I did qvm-run --pass-io work-qubesos -- /bin/sh` I got this weird kinda nothing.
It looks like a normal-looking prompt, but ls shows no files, I can do any kind of cd *whatever*, and just nothing responds or does anything. It’s weird.
But if I type random garbage, I do get a 'sh: qwer: command not found`, so it is doing something. It’s just useless and incomprehensible.
I think qvm-run is only getting standard-error, and is omitting standard-output, in addition to the fact that for whatever reason cat apparently can’t find files that I know exist.
Dunno why you have such problems.
I don’t have it.
Iv’e had it only when tried to substitute path with bash environment variables like ~/Downloads/file.txt.
I’m not in home but last time iv’e used it in Friday in a routine that run curl in disposable.
Did you edited some accessing policies in dom0 latelly?
It’s because this interactive shell notices that it isn’t running in any sort of terminal, so it behaves in a very bare-bones way. A trick to make it slightly more normal is to use the script tool inside the VM to fake a (so-called) dumb terminal for the shell:
[skyhawk@dom0 ~]$ qvm-run --pass-io work-qubesos -- `cat /home/user/qubes-builderv2/rpc/policy/50-qubesbuilder.policy`
cat: /home/user/qubes-builderv2/rpc/policy/50-qubesbuilder.policy: No such file or directory
Well, remove the quotes around the cat command as, if I’m correct, it’s trying to run the cat command inside dom0 before passing the output to work-qubesos. As cat fails in dom0, no command is provided to work-qubesos.
I personally retype every character of anything I need in dom0 as a way to check the file content.