Duplicates added to plugins list every time I start Audacity

Kubuntu 20.04, Audacity 3.1.2 installed as appimage. I suspect this is specific to the appimage approach.

I was wondering why I had so many plugins listed in the Add / Remove Plug-ins dialogue - and why so many had the same name.

I deleted ~/.audacity-data/pluginregistry.cfg following advice in other threads, which cleaned up the list. But already I’ve got three each of lots of the plugins (not all) - after launching Audacity three times. One of each group is Enabled, the others Disabled. They all have paths like
/tmp/.mount_audacidpJSDi/share/audacity/plug-ins/beat.ny
and it looks like the sections “.mount_audacidpJSDi/” have three different strings, I guess one for each time it was launched.

Is this avoidable? Is there any way to work around it or clean up the list, without losing my enabled/disabled selections?

Thanks

When an AppImage is launched, it is “mounted” (like mounting a disk) to a temporary mount point. The mount point is randomized (apparently by design: Feature request: Allow telling --appimage-mount to use a specific directory - Developers - AppImage), which has an unfortunate side effect for Audacity - each time it is mounted, so are all of the effects that are included with Audacity. Because the plug-ins are in a different location, Audacity sees them as new plug-ins.

Fortunately Audacity is smart enough to realize that the “new” plug-ins are duplicates, so it automatically disables the old versions.

Unfortunately (for the case of AppImages), Audacity is not smart enough to remove the “old” plug-ins automatically. The plug-in manager was designed before we had an AppImage version, and this problem was not anticipated. I think that the reason that Audacity retains plug-ins that are no longer available was because they may only be temporarily unavailable (for example, on an external drive that hasn’t been powered on this time).


Good question. Unfortunately I don’t have a good answer.
The best solution that comes to mind is:

  1. Quit Audacity
  2. Delete pluginregistry.cfg
  3. Launch Audacity
  4. Enable / Disable effects as required
  5. Quit Audacity
  6. Manually edit pluginregistry.cfg and delete all registrations that have
Path=/tmp/.mount_audaci.....
  1. Make a backup copy of pluginregistry.cfg

Then after quitting Audacity, or before launching Audacity, overwrite pluginregistry.cfg with your backup copy.

Not a great workaround, but perhaps better than nothing.





I think what is needed is the ability to rescan all plug-ins and rebuild the pluginregistry.cfg, so that non-existent plug-ins are removed from the registry completely.
Can you think of a better solution?

Thanks Steve … your logic is what I suspected was going on. And your workaround is what I was afraid I would need to do! And will do, anyway.

Joe

If we accept that this might delete plugins temporarily not available, as you noted - but they would be rediscovered later
and we accept that my workaround below is monstrously specific and should not even be contemplated
then your solution is the best.

Monstrously specific workaround: in the normal startup scan (I presume there is one), recognise the situation /tmp/.mount_audaci???/share … and treat them as matching.
More generally perhaps, identify the current app image mount and save / match paths as ${app_image_mount}/share … (using a bash-like syntax for example). Still not great.