Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 363 - Provide a Reset Preferences command inside Audacity
Provide a Reset Preferences command inside Audacity
Status: RESOLVED MOVED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.1.1
Per OS All
: P4 Enhancement
Assigned To: Default Assignee for New Bugs
http://wiki.audacityteam.org/wiki/Pro...
: patch_closed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-13 17:12 UTC by Bill Wharrie
Modified: 2018-08-20 11:51 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
1. Attempt to reset the config to defaults from within Audacity.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments
Reset button in all Preferences panes (5.40 KB, patch)
2014-12-28 18:44 UTC, Gale Andrews
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Wharrie 2011-04-13 17:12:03 UTC
There are occasions when the audacity.cfg file can become corrupt. The solution offered (on the forum, manual, and wiki) is to reset the preferences through editing the audacity.cfg file in a plain text editor and resaving over the corrupt version. On Windows and Linux this involves showing hidden files. 

http://manual.audacityteam.org/man/Preferences#Resetting_Preferences

The user loses all of their customizations, but they are happy to have Audacity working again.

There could be a new Prefs pane - "Reset" - with a description of what will happen and a "Reset" button or checkbox.

If could be a menu command that leads to a dialog that describes what will happen and the option to Cancel.
Comment 1 Gale Andrews 2011-04-13 22:57:29 UTC
(In reply to comment #0)
I think providing some way to reset preferences is a good idea. A menu item next to the current one to open Prefs would be neat but perhaps too easy to click on.

If a Prefs pane, perhaps it needs extra features. Maybe a text editor for the cfg file so advanced users could add things not exposed in the GUI, like how long to wait for the long processes beep? 

That said, when we really needed this was when Audacity wouldn't come up on top, so wasn't accessible. Corrupt .cfgs, or .cfgs that enable AU or VST effects can also prevent Audacity launching. If we were Windows only, an executable (or ability to CONTROL - click audacity.exe) to make Audacity launch with initialised .cfg, or running the installer as a "Repair" install would be really useful...
Comment 2 Bill Wharrie 2011-04-13 23:45:20 UTC
(In reply to comment #1)
> I think providing some way to reset preferences is a good idea. A menu item
> next to the current one to open Prefs would be neat but perhaps too easy to
> click on.
If it leads to a dialog that says "Are you sure you want to reset Audacity's preferences to the default values?", with the default button being "No", then I'm not too worried about accidental clicks. It's not the end of the world. They're not going to lose any audio.

> If a Prefs pane, perhaps it needs extra features. Maybe a text editor for the
> cfg file so advanced users could add things not exposed in the GUI, like how
> long to wait for the long processes beep? 
I was thinking of keeping it simple: "Are you sure you want to reset the Audacity preferences to default values? You will lose all your customizations. You should only do this if you are experiencing problems with Audacity that cannot be traced to another cause." Then you need to check the "Reset Preferences" checkbox, then click the "OK" button.

> That said, when we really needed this was when Audacity wouldn't come up on
> top, so wasn't accessible. Corrupt .cfgs, or .cfgs that enable AU or VST
> effects can also prevent Audacity launching. If we were Windows only, an
> executable (or ability to CONTROL - click audacity.exe) to make Audacity 
> launch with initialised .cfg
On Mac the standard way to do this is to launch the app while holding the OPTION key. The user should be presented with a dialog that says "Reset Preferences?".

Simply trashing the cfg would work if Audacity did not look for an old 1.2 prefs file and copy from that.
Comment 3 James Crook 2011-04-14 06:13:39 UTC
I know we've only got three comments in the trail here, so far, but I'd like to say here that in commercial organizations bugtrackers work best when they are a mix of problem description and record of work.  

The problem is that discussion of competing solutions, especially what changes to the user interface they imply, and the usability, discoverability and completeness or otherwise of those solutions can lead to a lot of discussion - which distracts from the core 'headline' issue or problem that the bugtracker issue is supposed to track.

My take (and I welcome being argued with) is that we keep this bug title as-is.  It is obvious to me that a reset preferences button needs an 'are you sure' of some kind with an explanation of why you might not want to.  It is fine to have that stated here in the tracker.  The wording of that can and should be worked out outside the bugtracker.

My take is that we also need some way to reset the preferences in the cases when Audacity does not launch at all, e.g. because of VST issues, or when Audacity does not come up 'on-top'.  These may become a separate issue if we deem them important enough to track - we probably will.  I have some opinions about what good solutions would look like, but let's talk those through outside the bugtracker.

I'm not looking for an instant radical change in how we use the tracker.  Best practice happens gradually, and it is almost impossible to lay down hard and fast rules as to what is good and what isn't.  This comment itself is a flagrant misuse of the bugtracker, since at least half the comment is not about the bug.  I want us to be reasonably relaxed about formal rules about how we use the tracker, but still have things flow well and efficiently.
Comment 4 Gale Andrews 2011-04-14 09:14:14 UTC
(In reply to comment #3)
As regards this bug, I think you could also argue that a method to launch Audacity with initialised .cfg might obviate the need for a button within the app. to do it. I assume the button would have no effect until Audacity was restarted anyway. 

My take would be that if we had a reasonable bug tracker it would accommodate editable discussions e.g. on another tab. As it is now, I think that to work on this it needs to go to a Wiki Feature Proposal. I thought I actually suggested that when we discussed this on the Forum a while ago. Are you up to starting that, Bill? Maybe "Proposal Easy cfg Reset"?
Comment 5 Bill Wharrie 2011-04-14 11:30:46 UTC
(In reply to comment #4)
> As it is now, I think that to work on
> this it needs to go to a Wiki Feature Proposal.
> Are you up to starting
> that, Bill? Maybe "Proposal Easy cfg Reset"?

Page created:
http://wiki.audacityteam.org/wiki/Proposal_Easy_cfg_Reset
Comment 6 Gale Andrews 2014-12-28 18:43:10 UTC
Added a patch (not by me of course except for wording tweaks) that provides a "Reset" button opposite OK/Cancel in Preferences. This button asks for confirmation of reset, then on "Yes", exits Audacity, asks for "Save Changes?" then after Audacity is quit, rewrites audacity.cfg to "NewPrefsInitialized=1". If there is a "Portable Settings" folder then audacity.cfg in that folder is initialized. 

The patch does not delete audacity.cfg (which is all that's wanted assuming user runs 2.1.0 or later after the reset, but which can't be 100% guaranteed). 

I tested the patch on all three platforms. 

An external app is also needed to reset Audacity Prefs if Audacity cannot be launched and the Audacity Windows installer cannot be used (or if user is on Mac).
See http://wiki.audacityteam.org/wiki/Proposal_Easy_cfg_Reset#external_reset . QA consensus currently favors writing "resetPrefs.txt" (the method already used in the Windows installer).
Comment 7 Gale Andrews 2014-12-28 18:44:27 UTC
Created attachment 528 [details]
Reset button in all Preferences panes
Comment 8 Leland Lucius 2014-12-28 19:07:01 UTC
How about when the reset button is pushed, Audacity create the resetPreferences file instead of trying to clean out the old cfg and then forcing the user out?

Then the user can decide on next execution whether to reset or not.

Of course, that doesn't remove the need for external commands to create the resetPreferences file if Audacity can't start, but it could simply the code a bit.
Comment 9 Gale Andrews 2014-12-29 08:39:21 UTC
(In reply to comment #8)
Leland wrote:
> How about when the reset button is pushed, Audacity create the resetPreferences
> file instead of trying to clean out the old cfg and then forcing the user out?
> Then the user can decide on next execution whether to reset or not.
That works for me too with two minor drawbacks a) user could forget what they did and delete resetPrefs.txt, which is unlikely to happen when reinstalling using the Windows installer b) we've had cases where users have reset .cfg by hand but then gone back to a previous version of Audacity on the grounds "that one used to work". That older version wouldn't be reset.       

If consensus is that not forcing an exit outweighs the above and someone posts a patch that does what you suggest, that would be fine with me.
Comment 10 Gale Andrews 2015-01-02 09:57:17 UTC
(In reply to comment #9)
Leland wrote:
>> How about when the reset button is pushed, Audacity create the resetPreferences
>> file instead of trying to clean out the old cfg and then forcing the user out?
>> Then the user can decide on next execution whether to reset or not.
Gale wrote:
> If consensus is that not forcing an exit outweighs the above and someone 
> posts a patch that does what you suggest, that would be fine with me.
On Mac, Audacity looks for resetPrefs.txt in:
"<path to the folder containing the Audacity build or installation>/Audacity.App/Contents/Resources/". Probably not too much of a problem. 

On Linux, a self-compiled build will look in /usr/local/share/audacity and a build installed by a package manager will look in /usr/share/audacity. Those locations require root privileges so Audacity will error that it can't write or remove resetPrefs.txt.

To solve the above, Audacity would need to be changed to write and look for resetPrefs.txt in its folder for application data (where audacity.cfg is stored).
Comment 11 Leland Lucius 2015-01-02 10:02:27 UTC
(In reply to comment #10)
> (In reply to comment #9)
> Leland wrote:
> >> How about when the reset button is pushed, Audacity create the resetPreferences
> >> file instead of trying to clean out the old cfg and then forcing the user out?
> >> Then the user can decide on next execution whether to reset or not.
> Gale wrote:
> > If consensus is that not forcing an exit outweighs the above and someone 
> > posts a patch that does what you suggest, that would be fine with me.
> On Mac, Audacity looks for resetPrefs.txt in:
> "<path to the folder containing the Audacity build or
> installation>/Audacity.App/Contents/Resources/". Probably not too much of a
> problem. 
> 
> On Linux, a self-compiled build will look in /usr/local/share/audacity and a
> build installed by a package manager will look in /usr/share/audacity. Those
> locations require root privileges so Audacity will error that it can't write or
> remove resetPrefs.txt.
> 
> To solve the above, Audacity would need to be changed to write and look for
> resetPrefs.txt in its folder for application data (where audacity.cfg is
> stored).

In wondered about that, but never got around to looking into it.  It must be that normal packaging done by the distro doesn't include the resetPrefs.txt file, otherwise people wouldn't be able to delete it.

But, yes, relocating it to the same folder as audacity.cfg makes more sense.

But, I've also been wondering that if a method of creating that file outside of Audacity is supplied, then why does there need to be one inside of Audacity?

Leland
Comment 12 James Crook 2015-04-27 15:03:36 UTC
I don't want reset preference buttons in every preference pane, besides it does not solve the key use case for this issue of needing to reset prefs in order to start Audacity at all, so I am closing (rejecting) the patch.
Comment 13 Gale Andrews 2015-04-28 03:31:45 UTC
(In reply to James Crook from comment #12)
> I don't want reset preference buttons in every preference pane
OK, but the closed patch did not do that - as per Comment 6 it offered one Reset button opposite OK/Cancel (i.e. a single button visible in whatever pane you are in).  

So that there is a clearer acceptable specification for this - does it run like this?

* We have an additional "Reset" pane, that could have options to reset audacity.cfg or reset selected prefs panes only - i.e. if you don't visit that pane you cannot reset anything
* We do not quit Audacity immediately on reset, but employ a reset file and Audacity is changed to look for for it in its application data folder.  

IMO the additional Reset pane is probably overkill compared to a single button, unless everyone else wants such a pane.  
 
> besides it does not solve the key use case for this issue of needing to reset 
> prefs in order to start Audacity at all
It doesn't, but I think that an external *cross-platform* easy reset should have a separate issue for it, and we still need this issue as well if we can specify what we want.

So I made clear in the subject of this issue that it's about "Provide a Reset Preferences command inside Audacity".
Comment 14 James Crook 2015-04-28 06:02:13 UTC
With the clarified title from Gale we now need a new enhancement bug.  It is for an easy way to reset prefs before Audacity has fully started.  That would be (in my view) solved by shift held down when starting up, and a command line option "./audacity --reset".  We might even install a shortcut for that on windows from the installer.

Meanwhile this enhancement request is (I think) for a single button within Audacity that, is not per page, that resets all prefs when Audacity exits.  If it is going to be 'lonely' all on a preferences page of its own, we can add other information on that page so it isn't.  That long discussion of what and how is not suitable for within Bugzilla and needs to be taken to a proposal page.

I think the external reset is the more important bug/issue and possibly P3.  It is easier to action, and splitting it off makes it more likely it will be acted on sooner.
Comment 15 Peter Sampson 2016-02-14 10:36:56 UTC
As a Mac-virgin (only in my 24th hour of use right now) I found it virtually impossible to find where Audacity on a Mac was storing my audacity.cfg file so that I can easily reset it (for testing in my case). 

Even after reading the Manual I needed a helping hand from Steve by email - and even then I floundered around for the best part of an hour trying to find it. 

Ok solved for me now as I have a copy of the Audacity folder on my Mac desktop so I can go there easily abd delete the .cfg file - but we really should make this easier for others to do.
Comment 16 James Crook 2017-08-10 12:16:38 UTC
MOVED to wiki proposal.