In OS X if you delete an applications preferences and then run that application, it will automatically create default preferences for you. Too many applications depend on their configuration files already existing for them to work properly and I think it would really smart if the application checks if its configuration files are set correctly, and if they aren't, to offer to reset them. But if the configuration files aren't even their, then it can automatically create them for you without you having to even indicate it to do that. I really think this would be a smart approach to handling problems on a system where the configuration files are either missing or are incorrectly configured.
Samba is a good example of this. If you delete that smb.conf file, then it can't do anything. If it did this, that would be so awesome.
Certain apps that can't have a default configuration, would instead ask the user by going through a wizard of what they should be.
An example is the iptables app, if it noticed it had no preferences, then it would notify the user to go through a wizard to create default preferences again giving the choice of which default configuration they would want to use. One could be wide open, another could be locked down, and a third would be to import preferences from a file. Either way it would prevent an app from running without preferences being there.
For debugging an app without preferences, there could be a universal option such as --nopref and attempt to load the app when there was no preferences. Since obviously developers would know of this option to call and not end users.
It should not be required by the end user to have to manually edit or create any preferences that an application needs if that application can by default recreate default preferences, or if there is more then one default preference to start out with, give the user the choice of which one they would want to start out with.
These 3 steps should be taken:
1. Check if there are any preferences, if there is some, proceed to 2. If not, go to 1a.
1a. Check if there is only default preferences. If so, recreate them. If there is more then 2 default preferences configurations, step the user through a wizard.
2. Check if preferences are valid and not corrupt, if so, proceed to step 3. If not, proceed to step 2a.
2a. Attempt to repair preferences. If succeeded, go to step 3. If not delete preferences and go to step 1a.
3. Launch application.
Here's an interesting response to when Samba doesn't work with no configs why it takes so bloody long just to remember how to setup your shares again:
http://linuxhaters.blogspot.com/2008/07/of-silos-and-samba.html
If this is for a service, and it includes a configuration file, then there should be a ui for changing that configuration. When that service starts up and it has no configuration file, it should again either automatically create it for you, or send you through a wizard to configure it. But at the same time the configuration file needs to be trimmed down and features in it that only a developer would need should be removed with hard coded defaults. But if a developer wants to change those hard coded defaults, they are free to do that. Either way, it makes the end users life easier. And that is what counts here after all isn't it?
Tags:
(none)
No attachments.