Re: [qubes-users] best way to disable a linux service in a AppVM

Is it an option to clone your current template and disable the services permanently in your new template?

It is an option. But in this case I'd prefer the way using /rw/config/rc.local not to maintain another template.

I've learned there must be 3 alternatives, otherwise you've not done enough research. Maybe there's a 3rd way?

There is indeed a third way, which fits nicely in to the Qubes
framework, and is used by qvm-service. Instead of disabling the
service, control it.

If your service is foo.service:
Create a folder foo.service.d, and create a file 10_qubes.conf with
something like


Now you can control with `qvm-service --enable <qube> foo` in qubes
where you want the service to run.

You could invert the sense of control by using
ConditionPathExists=!<some parameter> but this may lead to confusion.

1 Like

Thanks unman, that's exactly what I was looking for. Except, there's a 4th way. :slight_smile: