Opening applications using qvm-run

174 views
Skip to first unread message

tetra...@danwin1210.me

unread,
Feb 27, 2021, 3:09:33 PM2/27/21
to qubes...@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.

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?

tetra...@danwin1210.me

unread,
Feb 27, 2021, 3:10:33 PM2/27/21
to qubes...@googlegroups.com

unman

unread,
Feb 27, 2021, 6:57:35 PM2/27/21
to qubes...@googlegroups.com
Is this Torbrowser specific? Because it doesn't block with other
programs (or at least doesn't seem to do so for me).
On what is the "anon" qube based? How is it configured to run torbrowser
with no path?

tetra...@danwin1210.me

unread,
Feb 28, 2021, 8:48:11 AM2/28/21
to unman, qubes...@googlegroups.com
On Sat, Feb 27, 2021 at 11:57:32PM +0000, unman wrote:
>Is this Torbrowser specific? Because it doesn't block with other
>programs (or at least doesn't seem to do so for me).
>On what is the "anon" qube based? How is it configured to run torbrowser
>with no path?

It's not Torbrowser specific for me, that was just an example using a
Whonix Workstation VM. (it does work as stated -- I did test it)

In actuality I want to launch specific applications (that launch fine
using applications menu) from a dom0 script, but the only way I can find
to launch them without blocking the script execution is using
gnome-terminal. And that opens an extra (unneeded) terminal window.


airele...@tutanota.com

unread,
Feb 28, 2021, 2:03:52 PM2/28/21
to Qubes Users
Feb 27, 2021, 14:16 by qubes...@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

unman

unread,
Feb 28, 2021, 6:49:07 PM2/28/21
to qubes...@googlegroups.com
Do you have the same problem with non Whonix qubes?
I dont use Whonix, and dont have this problem with any of my other
template based qubes.

tetra...@danwin1210.me

unread,
Mar 1, 2021, 4:57:59 PM3/1/21
to unman, qubes...@googlegroups.com
On Sun, Feb 28, 2021 at 11:49:04PM +0000, unman wrote:
>> It's not Torbrowser specific for me, that was just an example using a
>> Whonix
>> Workstation VM. (it does work as stated -- I did test it)
>>
>> In actuality I want to launch specific applications (that launch fine using
>> applications menu) from a dom0 script, but the only way I can find to launch
>> them without blocking the script execution is using gnome-terminal. And that
>> opens an extra (unneeded) terminal window.
>>
>
>Do you have the same problem with non Whonix qubes?
>I dont use Whonix, and dont have this problem with any of my other
>template based qubes.

Yes. But the other solution (qubes.StartApp) did the trick.

tetra...@danwin1210.me

unread,
Mar 1, 2021, 4:59:27 PM3/1/21
to airele...@tutanota.com, Qubes Users
On Sun, Feb 28, 2021 at 08:03:47PM +0100, airelemental via qubes-users wrote:
>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?

Ulrich Windl

unread,
Mar 13, 2021, 1:14:08 PM3/13/21
to qubes...@googlegroups.com
On 2/28/21 11:46 PM, tetrahedra via qubes-users wrote:
> On Sun, Feb 28, 2021 at 08:03:47PM +0100, airelemental via qubes-users
> wrote:
>> 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.
Reply all
Reply to author
Forward
0 new messages