-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent KDE Applications to overwrite elektra files #17
Comments
Please give a concrete example of such parsing error.
Yes, the application should not know about "if and which configuration files" are involved when using Elektra. So within kconfig no configuration files should be passed, instead only kdbGet&ksLookup should be used to locate configuration.
It would be even better if they do not write useless configuration (copies from defaults or /etc). Ideally they would only write out keys that they actually changed. See #12 |
Overwrite
This is thrown, when the
I will implement those changes.
I fear this is something the KDE dev team is responsible for... |
Of course, but why would this happen?
You mean people using KConfig? |
During Plasma start-up some applications write directly to the configuration files to store their default settings. I checked with auditd and the debug messages added to the INI backend to see if the file was accessed by the INI backend, which it wasn't, therefore I suspect that some applications directly write their default configuration to the file which is specified by the backend.
Yes and no, more specifically the people developing KDE. |
While this is a disaster from software architecture point of view (violation of layers) it might not matter so much to us as we planned to use @darddan's kconfig plugin anyway. Then we would understand what they directly inject into the config files. But how do the applications even find out about the config file
I am more and more confused. We are currently developing KDE (specifically kconfig). So who if not we should change the situation? Of course we would need to discuss bigger changes with the mailinglist. |
I totally agree.
KConfig requires the backends to set a file name for their configuration and apparently some applications abuse this information.
This seems to be a specific problem with some of the applications of KDE (e.g. baloo, plasmashell). I haven't checked in the sources of these projects yet, but I guess this is a problem they need to fix at their side. |
We should not pass out our private config files. Then the problem should disappear (as long for all KDE specific files kconfig is used). |
I had to implement these changes for #2. KConfig would not reuse the backend, if the backing file would have changed. Base was read from system and ours in user, because it was already written. As I was using the internal files, changing namespace would result in different files and therefore KConfig creating a new backend with the wrong absolute path. I would use an URI instead of the filename, or should I use the legacy filenames? URI would have the structure |
URI sounds fine. But please use the same structure as Elektra's path. So See also doc/tutorials/application-integration.md |
I have changed the URL now and pushed to the branch that is currently in review in #14 |
As discussed, please open a new PR. |
Some KDE applications appear to write default settings directly to their configuration file when the keys they require are not present (e.g. plasmashell, baloo). This is no problem, when the keys are loaded from a write protected location (e.g. /etc/) but results in Elektra parsing errors, when the file is in the user namespace.
A work-around would include the following changes:
/dev/null
as file name on unixoids andNUL
on windows systemsThis way KDE applications can write their configuration and not corrupt the actual files.
The text was updated successfully, but these errors were encountered: