My snap installation folder is /opt/snap4.0/.
My snap user folder is /home/user/.snap/.
Why are there 2 snap.conf files (/home/user/.snap/etc/snap.conf, and /opt/snap4.0/etc/snap.conf)?
And, what variables should I define in one, and in the other?
Furthermore, I noticed that the file /home/user/.snap/etc/snap.conf seems to have precedence over /opt/snap4.0/etc/snap.conf at least in the Snap desktop. Is this always true?
Are you sure that you are referring to snap.conf and not to snap.properties?
Actually snap.conf is pretty boring and has only some start configuration parameters mainly required by NetBeans. It should only exist in the installation directory. snap.properties is of more interest.
The /opt/snap4.0/etc/snap.properties file is the general configuration for the installation and /home/user/.snap/etc/snap.properties is for the user which overrides the general settings.
This allows in general different configurations for different users.
there can be even more *.properties files. For example s1tbx.properties and s2tbx.properties .
Actually one for each module cluster (defined in snap.cluster.)
What you can define in snap.properties is listed on this wiki page.
Thanks for your detailed reply including the explanation between general and user-specific configurations.
Probably, I might have some legacy files on my .snap folder from old versions of snap thus the confusion…