7 ms·
It really is a mess and it would be helpful if we had some sort of database for configuration that was reasonably standardized. Some sort of "registry" if you
by luma 4y ago
It really is a mess and it would be helpful if we had some sort of database for configuration that was reasonably standardized. Some sort of "registry" if you will :D
- overlisted 4y agoGNOME has dconf[1], but it's only usable through D-Bus, which probably annoys the anti-systemd people [1] https://en.wikipedia.org/wiki/Dconf https://en.wikipedia.org/wiki/Dconf
- MichaelCollins 4y agoIt probably annoys most people who are accustomed to using their preferred text editor to configure their software, and it probably also annoys all the other users who are accustomed to using typical GUI preference windows accessed through the menus to change their configuration. Things like dconf and about:config exists in no man's land, where neither generic GUI skills nor generic unixy skills are applicable.
- forgotpwd16 4y ago>and it probably also annoys all the other users who are accustomed to using typical GUI preference windows accessed through the menus to change their configuration How is this a problem with dconf? GNOME Settings for example is typical GUI preferences and works as a front-end to the dconf database.
- enduser 4y agoIt's not exactly a feature to have several layers of abstraction, when a text editor could suffice.
- overlisted 4y agoUnix will never to achieve true user-friendliness and wide adoption if we treat settings like this. The reality is that most people need a graphical, hard to break way of changing their settings to use your software. Edit: Although I agree that some situations may require a readable text format, like a dotfiles repo. I personally use the `dconf-editor` program to find the right keys and the `dconf load` command to sync them from a regedit-like file format
- likeclockwork 4y agoPlenty of users find editing configs in a text editor very friendly. Changing away from that would be LESS friendly to those users. Which users are most important to be friendly to?
- stormking 4y agoThe problem here are UI designers who adore Apple but cannot afford a Macbook. So they target the Linux desktop.
- kevin_thibedeau 4y agoI find text configs very friendly up until the point that a package manager blows away my changes. This system harks from an era before fully automated software updates when a full time employed sysadmin was expected to manually oversee every single update. It's far easier to automate incremental changes to a binary database than to non-destructively modify a free form text file.
- pxc 4y ago> I find text configs very friendly up until the point that a package manager blows away my changes. Neither of these is a complete answer, but 1. Distros like NixOS and GuixSD address this successfully by emitting the config files themselves. They don't statefully edit your configs but instead store them in their own language and then translate them as wholes. 2. You can mitigate much of the pain of this with something like etckeeper, which essentially gives you version control for /etc.
- Quekid5 4y agoThat text file and your editor is two layers of abstraction (at least, because there's parsing involved, e.g. how to i specify timouts? sizes? Can I use "MiB", "s", "ms", etc?). The thing we want to optimize for is "how easy is to change a setting". Firefox's "about:" seems like a reasonable approach for expert users.
- nequo 4y agoBut the abstraction that is the text editor is shared across many programs. You can use your favorite text editor to edit any of the plain-text configs that you need. Firefox’s about: and the way to edit it are specific to Firefox.
- Quekid5 4y agoWell, yes, but we were imagining a world with a sort of universal "about:", I think? You wouldn't even need that many basic types to cover about 90%+ of the state space. Of course, there would be bonus points if applications could define their own types in a UI-meaningful way.
- pessimizer 4y ago> how to i specify timouts? sizes? Can I use "MiB", "s", "ms", etc? These issues neither disappear nor improve when you hide the settings in a mystery binary.
- Quekid5 4y agoI agree, which is why I mentioned the "about:" thing. It would be nice to have a base level of types that all programs could agree on.
- MichaelCollins 4y agoLast time I tried to use it, "GNOME Settings" (or whatever it was calling then) was woefully incomplete and I had to figure out that dconf-editor existed (which wasn't in the menus.) Same problem with Firefox; hamburger->settings will take you to a GUI that contains maybe 0.01% of all the settings Firefox actually has. You have to be "in the know" to know that about:config exists. I think the first time most firefox users find out about about:config is when they're angrily searching the web for a solution to their problems, which is basically how I discovered dconf-editor too. You don't find either of these by searching through the GUIs like a normal computer user, nor will you find them by poking around in your dotfiles like a seasoned console jockey.
- sillystuff 4y agoAnd, once you have more than a trivial number of changes in about:config, you search for something that will allow you to have sane configuration management, and discover, the 'user.js' file. Any setting in about:config can be set in user.js and your user.js file can be diffed, grepped, version controlled, edited with your favorite editor, and copied between profiles/machines. Sadly, Mozilla is moving a lot of config out of about:config/user.js and into multiple random sqlite files, so sane config management is getting harder with each new release.
- amarshall 4y agoAlmost all of the things that get written to dconf settings are in some typical GUI preference window in whatever application. Firefox’s about:config can be somewhat controlled through a user.js file.
- chasil 4y ago...but preferably using the SQLite engine, and eschewing well-known proprietary formats. https://news.ycombinator.com/item?id=32275078 https://news.ycombinator.com/item?id=32275078
- fezfight 4y agoBetter yet, a flat file structure that you can grep with standard utilities. We can put it somewhere convenient, like in dot files in the users home directory. We can even add them to git with something simple like git add *.*
- chasil 4y agoAs tempting as that may be, the ability to enforce ANSI SQL constraints (not null, unique, check, foreign key, etc.) could prevent many types of configuration errors. If you want to grep everything in a sqlite database, then ".dump" it. $ echo "create table myconfig(param text, value text); insert into myconfig values('scrollbar', 'wide'); insert into myconfig values('verbose', 'no');" | sqlite3 myconfig.db $ sqlite3 myconfig.db '.dump myconfig' | grep verbose INSERT INTO "myconfig" VALUES('verbose','no');
- fezfight 4y agoGood tips, thanks! I love sqlite3.
- NavinF 4y agoYes! Let's also make every config file is its own special snowflake with its own syntax, keywords, and escape characters. That way, it's much harder for software to interact with these files and humans will have to write config templates for each deployment. Oh and we might as well store these config file in a different place on each distro and move them around once in a while just to keep things interesting. Users can ignore upstream documentation and just strace the process if they wanna know where the files are this year.
- deleted 4y ago
- dainiusse 4y agoIBM AIX has "sort of registry". There are some good things in AIX, but querying configurations is ugly as hell
- grumple 4y agoBut it's really nice just being able to alter a regular text file for settings for whatever application you're dealing with.