Changes in template VM's /etc/skel are not being picked up by disp VM

I cloned a Debian 12 template VM and then created a disposable VM based on that template.

[user@dom0 ~]$ qvm-create --template <TEMPLATE> --label red <DISPOSABLE_TEMPLATE>
[user@dom0 ~]$ qvm-prefs <DISPOSABLE_TEMPLATE> template_for_dispvms True
[user@dom0 ~]$ qvm-features <DISPOSABLE_TEMPLATE> appmenus-dispvm 1

Now I want to update the .bashrc to add an alias to the disposable VM. I tried this by adding the alias to /etc/skel/.bashrc in the template VM. But when I launch instances of the disposable VM, the .bashrc file hasn’t changed. I tried shutting down the template VM, shutting down my entire PC.

How can I update the .bashrc file for all new instances of the disposable VM?

1 Like

You can edit ~/.bashrc in the disposable template, and /etc/skel/.bashrc in the template VM for the disposable template.

I don’t know if /etc/skel can be used, it’s only used when the user is created, and I don’t think that happens when the DVM is started.

I would just edit the ~/.bashrc in the disposable template.

Edit: renamed the template vm

1 Like

Just to note that “template VM” that @renehoj is mentioning is “disposable template” since “template VM” term is confusing:


It cant, for the reason you give.
/etc/skel is only used when a qube is created from the template. In
this case, when the qube used as disposable template was created.
Subsequent changes in /etc/skel in the template are not seen by
existing qubes.
Make the change in the disposable template and it will be picked up by
all the disposables.

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


No it happens in-qube as part of the initialization of its ‘private’ volume by qubes-mount-dirs.service, usually during the qube’s first startup. If you never start the disposable template (or if you deliberately revert the ‘private’ volume back to empty contents after starting it) then the initialization has to happen during the DisposableVM startup, and in that case it will apply /etc/skel from the disposable template’s TemplateVM.


Thank you everyone. I modified the .bashrc in the disposable template and it’s being picked up disposable VMs.