[qubes-users] Injecting configuration files into appVM when it's created/started for the first time

Qubes wrote:

Vít Šesták wrote:
Perhaps my search terms are just out of whack, but I have had a good
look around and I cannot find a system wide location for
`~/.config/qt5ct/qt5ct.conf` that controls the Style and Icon Theme for
example.

It's easy to find.

1. Me: Do you know a system-wide file for ~/.config/qt5ct/qt5ct.conf?
ChatGPT: Yes, the system-wide configuration file for ~/.config/qt5ct/qt5ct.conf is typically located at /etc/xdg/qt5ct/qt5ct.conf. This file contains the default settings for

I tried `/etc/xdg/qt5ct/qt5ct.conf` and it didn't work. I also tried `/etc/xdg/qt5ct.conf` (just to try my luck) but it also doesn't work. I will try it again just to double check, maybe my midnight oil lamp was already running out of oil when I did try and I made a mess of it.

Ok so just to provide feedback, I have tried this again. The default is in fact located at `/etc/xdg/qt5ct/qt5ct.conf`, but it is only applied if `~/.config/qt5ct/qt5ct.conf` does not exist, with caveats. In fact what happens is if `~/.config/qt5ct/qt5ct.conf` does not exist `/etc/xdg/qt5ct/qt5ct.conf` is copied to `~/.config/qt5ct/`. Which kind of solves the problem.

If the file exists you can delete it and just close all of you Qt applications and open them again. With the first one that you open it will check if `~/.config/qt5ct/qt5ct.conf` exists and if not make a copy of `/etc/xdg/qt5ct/qt5ct.conf`.

This still does not allow a seamless edit to `/etc/xdg/qt5ct/qt5ct.conf` (in the Template) that will just apply to all VMs, but it does make it easier.

I had a look at `strings /usr/lib64/libQt5Gui.so.5.15.9|grep '^QT_'` but I don't see a variable name that indicates to me it has anything to do with the path of `qt5ct.conf`. Thank you for the suggestion I have learnt something new today.

Qubes wrote:
Is this normal/expected behavior?

As has been discussed in this thread, making changes in `/etc/skel` in a template of an existing VM does not propagate to the VM. However, if you change the VMs template to a different template it seems like `/etc/skel` is copied to `/home/user` when the VM boots, even though it is not a new VM. I don't understand the documentation in this way.

I checked this now. This not the case, it was because of a test I was doing with another thread "Injecting configuration files into appVM when it's created/started for the first time". The test I was doing did something unexpected that made it appear as if `/etc/skel` was copied to a VM when the Template changes when in fact it does not.