[qubes-users] Opening applications using qvm-run

I'm trying to figure out how to open applications in VMs from dom0 using qvm-run, and how to do so without blocking the terminal in dom0.

For example:

$ qvm-run anon "torbrowser qubes-os.org"
Running 'torbrowser qubes-os.org' on anon

The above command sucessfully launches Tor Browser in the `anon` VM, but I can't run another command in the same dom0 terminal window until Tor Browser (in the VM) finishes (exits).

Alternately I can do something like

$ qvm-run anon "gnome-terminal -- torbrowser qubes-os.org"

but that leaves a terminal window running in the `anon` VM.

I've also tried all the usual variations on `nohup`, `disown`, `&`, and the like, but none of them seem to do the trick.

Any ideas?

Feb 27, 2021, 14:16 by qubes-users@googlegroups.com:

I'm trying to figure out how to open applications in VMs from dom0 using qvm-run, and how to do so without blocking the terminal in dom0.

For example:

$ qvm-run anon "torbrowser qubes-os.org"
Running 'torbrowser qubes-os.org' on anon

The above command sucessfully launches Tor Browser in the `anon` VM, but I can't run another command in the same dom0 terminal window until Tor Browser (in the VM) finishes (exits).

Alternately I can do something like

$ qvm-run anon "gnome-terminal -- torbrowser qubes-os.org"

but that leaves a terminal window running in the `anon` VM.

Try:

qvm\-run \-\-service anon qubes\.StartApp\+janondisttorbrowser qvm-run --service untrusted qubes.StartApp+firefox
$ qvm-run --service personal qubes.StartApp+thunderbird

Thanks, that did the trick!

Two questions:

1. Is there any way to pass arguments?

2. for some applications the name I have to pass to qubes.StartApp is not the same as the command used on the command line (e.g `janondisttorbrowser` instead of `torbrowser`). How do I find out the correct name for an arbitrary application? is it always the same as the name of the .desktop file in /usr/share/applications?

Try:

qvm\-run \-\-service anon qubes\.StartApp\+janondisttorbrowser qvm-run --service untrusted qubes.StartApp+firefox
$ qvm-run --service personal qubes.StartApp+thunderbird

Thanks, that did the trick!

Two questions:

1. Is there any way to pass arguments?

What about reading the manual page?
        --service
               Start RPC service instead of shell command. Specify name of the service in place of COMMAND argument. You can also specify service argument, appending it
               to the service name after + character.