Clean way to temporarily replace a config file?

I make use of an attracting program called Inkscape, which has both a GUI and also a command line user interface. When made use of on the command line, it has a lot of alternatives that can just be regulated via a customer - details config documents, which is hardcoded to be:

$HOME/.config/inkscape/preferences.xml

This config documents constantly has the alternatives that were most lately made use of in the GUI, which might be the incorrect ones when I'm scripting.

To function about this, I have my manuscript conserve a duplicate of the config documents, change it with a typical config documents, run the program, and afterwards replicate the conserved config documents back.

This functions alright yet is not actually tidy. As an example, it will not function effectively if 2 circumstances of the manuscript are being run simultaneously.

On Unix, exists a cleaner means to execute this job of forging out a program so it takes its config documents from someplace that I desire, as opposed to from the pathname hardcoded in the program? Possibly something entailing web links, or something like BSD prisons?

7
2022-07-25 20:44:39
Source Share
Answers: 0