Don't edit the XML files directly. They are core system files which can be overwritten by OS updates!
The correct way to create custom changes that persist across upgrades is to create
gschema.override files, which are explained here:
Basically, the GSettings XML Schema compiler reads the XML files first, and then it reads all of the override files in the folder. They recommend naming the override files with
nn is a number from
99, since it reads and sorts the file list. Therefore, the higher your number prefix, the later in the file list it will be processed, and therefore the higher "priority" the override has (with
99 being maximum), since higher numbers will be applied later during the processing.
You can therefore create the following file to give your changes the maximum priority (note that the filename doesn't matter, but our
99 prefix means that it will load after all other conventional override files):
In that file, you need to specify the settings area you want to override, and the individual settings. To change the scaling to 200%, you would change the factor to 2. Note that fractional scaling isn't supported. Valid numbers are
0 (auto detect, this is the default and doesn't work well and usually just auto-picks
1), or explicitly defined values of
4 for 100/200/300/400% respectively.
You can also set a global text scaling factor in the same file, if you prefer having slightly smaller fonts in your 200% scaled GUI.
Both settings are demonstrated here:
text-scaling-factor supports fractional scaling, and 0.87 will make fonts a bit smaller, but that whole line is safe to remove if you don't want to change the font scaling at all.)
After you've created your personal overrides-file, you need to recompile the GSettings database to make your settings take effect, because the actual database is binary and is created from the XML and override files. All you need is this simple command:
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
PS: This was originally submitted as an edit to Lauri's answer, but StackExchange's moderators told me "Please submit a new answer with this information since the edits are substantial". So here you go! Huge thanks to Lauri for the original answer! :)