Qvm-copy-to-vm no longer works in dom0 on Qubes 4.2.4

Hi all,

I’m running Qubes OS 4.2.4. I used to copy screenshots from dom0 to a VM using:
qvm-copy-to-vm <target-vm> <file>

This always worked before, but now it returns:
qvm-copy-to-vm: command not found

Nothing else seems broken. I recently updated all my templates, but since this command runs in dom0, I assume that’s unrelated.

Has anyone seen this before? I have searched the forum and found this post Qvm-copy-to-vm NOT broken after upgrade - #4 by DVM but this doesn’t seem to be the similar issue to my problem.

Thanks.

I just looked at the latest RPM spec files and it shows that the file should be present at /usr/bin/qvm-copy-to-vm

2 Likes

So, are you sure the file exists? Are you able to find the command by yourself, i.e. using which? Maybe try /usr/bin/qvm-copy-to-vm instead?

1 Like

Yes, I ran:


which qvm-copy-to-vm

and it returned
/usr/bin/qvm-copy-to-vm

So the file does exist.

so

/usr/bin/qvm-copy-to-vm

if that works then check if you have /usr/bin in $PATH

echo $PATH

don’t show it here as it contains yours username for Dom0, just tell if it’s there.

1 Like

I’m fairly sure, that which will search $PATH and print what matches the argument to which … so since which returned

/usr/bin/qvm-copy-to-vm

then /usr/bin should be in $PATH. :-/

:slight_smile:

1 Like

You are too modest, since you are completely correct.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

On my system (4.2.4 – updated this morning) everything is there, as well:

[user@dom0 ~]$ which qvm-copy-to-vm
/usr/bin/qvm-copy-to-vm

and

[user@dom0 ~]$ echo $PATH
/home/user/.local/bin:/home/user/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin

1 Like

so, @sinartus , did you run

/usr/bin/qvm-copy-to-vm

in Dom0 terminal?

Your problem is with some script?

I have checked all of the suggestions above and everything is all accounted for and present. I have /usr/bin in $PATH

I am executing this in Dom0 terminal as such:
qvm-copy-to-personal /home/user/Pictures/Screenshot_xxx.png
and the result I am getting is bash: qvm-copy-to-personal: command not found.

I am sure I am doing something wrong here. I might just be off a letter or something.

You used qvm-copy-to-vm personal /home/user/Pictures/Screenshot_xxx.png before, right?

And what is the output of the following?

[user@dom0]$ ls -l /home/user/Pictures/Screenshot_xxx.png
1 Like

As @parulin hinted:

Mind the syntax!

Ahh…I knew the fault must be mine.

qvm-copy-to-vm personal /home/user/Pictures/Screenshot_xxx.png

I was missing the “-vm”

Thank you @OvalZero and @parulin for pointing that out!

2 Likes

You could always alias ‘qvm-copy-to-vm personal’ to ‘qvm-copy-to-personal’ so you can make this mistake with impunity in the future. In fact, if you copy to that particular vm often, you may find it a timesaver.

Wait… This issue isn’t solved, right? Because the first post was correct about the syntax.

@parulin In my first post, I copied the syntax from the Qubes OS documentation, but I assumed that "vm" should be replaced with the VM’s actual name, similar to what @SteveC showed, changing

qvm-copy-to-vm personal
to
qvm-copy-to-personal.

In the past, I had always included the -vm in the command but in haste, I made that mistake.

@SteveC To create the alias, should I add the following line to my ~/.bashrc file in dom0?

alias qvm-copy-to-personal='qvm-copy-to-vm personal'
1 Like

:sweat_smile:

Next time copy the exact output please…

1 Like

Will do! Thank you @parulin

I can’t be positive you got the syntax absolutely right, but yes that’s what I would do if I wanted that alias. (I have similar aliases for copying things FROM a very specific qube (that’s almost as isolated as Vault) that holds config files for my installation.)