There are existing standards. The issue is that there are too many different standards and some programs will choose to make their conf files half standardized, half unique.
There’s INI, YAML, JSON, XML, TOML, etc.
Honestly, the Linux team needs to just choose one of these formats, declare it the gold standard, and slowly migrate the config files for most core components over to it. By declaring a standard, you’ll eventually get the developers of most major third-party tools and components to eventually migrate.
Thats not exactly what I meant, I meant a system where you would have a file that defines all the options for an app, and their possible values, so a gui or program could be made to edit them.
Yeah something like that should be doable but it would require that programs provide a schema and the OS to have a way for the programs to “announce” themselves so it can be aware of the configuration files and the schema.
I’m sure some project could create a GUI that could cover the most common applications, though.
It’s always fun trying to set up a program, learning the config syntax, running it, having it fail, and then spending an hour debugging before you realize it never even read your config changes because you were supposed to use one of the other half dozen conf files it has spread all across your drive. Is it under /etc/, /usr/local/etc/, /opt/, or your home directory?
I was thinking, they would put the definitions in a specific directory, like if its installed locally, ~/.config/definitions or if installed globally /etc/definitions and then any settings apps would search for those.
I don’t know, if you can actually generate a GUI from such a schema, though. They’re intended for validating existing data, so I don’t know, if they give you enough data to work with to actually provide a GUI. For example, you don’t really have a human-readable name in these. The fields are rather called e.g. “productName”.
Yeah, I am aware of schemas, I meant something where you would have, for example, a conf.definition.json file:
{
screenResolution:{
definition:"What resolution the screen should be",
options:["1920x1080","720x470"]}}
So then, a settings app could control settings for other programs, like apple does, by checking this file, and editing the configuration file based on it.
There doesn’t seem to be an existing standard for what I described, from what I see.
There are existing standards. The issue is that there are too many different standards and some programs will choose to make their conf files half standardized, half unique.
There’s INI, YAML, JSON, XML, TOML, etc.
Honestly, the Linux team needs to just choose one of these formats, declare it the gold standard, and slowly migrate the config files for most core components over to it. By declaring a standard, you’ll eventually get the developers of most major third-party tools and components to eventually migrate.
Thats not exactly what I meant, I meant a system where you would have a file that defines all the options for an app, and their possible values, so a gui or program could be made to edit them.
Yeah something like that should be doable but it would require that programs provide a schema and the OS to have a way for the programs to “announce” themselves so it can be aware of the configuration files and the schema.
I’m sure some project could create a GUI that could cover the most common applications, though.
It’s always fun trying to set up a program, learning the config syntax, running it, having it fail, and then spending an hour debugging before you realize it never even read your config changes because you were supposed to use one of the other half dozen conf files it has spread all across your drive. Is it under
/etc/
,/usr/local/etc/
,/opt/
, or your home directory?I was thinking, they would put the definitions in a specific directory, like if its installed locally, ~/.config/definitions or if installed globally /etc/definitions and then any settings apps would search for those.
What comes sort of close, is that you can define so-called “schemas”, at least for JSON, TOML, YAML and XML. Here’s what that might look like for JSON: https://json-schema.org/learn/getting-started-step-by-step
I don’t know, if you can actually generate a GUI from such a schema, though. They’re intended for validating existing data, so I don’t know, if they give you enough data to work with to actually provide a GUI. For example, you don’t really have a human-readable name in these. The fields are rather called e.g. “productName”.
Yeah, I am aware of schemas, I meant something where you would have, for example, a conf.definition.json file:
{ screenResolution: { definition: "What resolution the screen should be", options: [ "1920x1080", "720x470" ] } }
So then, a settings app could control settings for other programs, like apple does, by checking this file, and editing the configuration file based on it.
Schemas are a nightmare to work with, and are totally unreadable
If you ignore the gui part, this sounds a lot like nixos.
It’s not about what serialization format, it’s about what possible values there are for each field.