Invisible audacity session running won't let me start audacity

When I run audacity I get the following error message:

The system has detected that another copy of Audacity is running. Running two copies of Audacity simultaneously may cause data loss or cause your system to crash.Use the New or Open commands in the currently running Audacity process to open multiple projects simultaneously.

I checked the system's monitor and there is NO audacity process running. At least not one that I can spot.

I rebooted and nothing happened.


This bug also happens after a power failure. There is a lock file at /var/tmp/audacity-myusername/audacity-lock-myusername that does not get cleaned up after a hard shutdown. It will frustratingly prevent any new instances of audacity from being launched, even if you have no current instances running. Delete this file, and you're good to go.


If there are any audacity processes running, you can terminate them all by running the command below from a terminal window:

killall audacity

The alternative would be to wait and give it time to exit itself, as sometimes when you close an application window, the process might continue running in the background and tidying up stuff for some moments. Of course this doesn't help if the process isn't actually about to exit.

You could also simply log out of your user session and back in, or reboot the computer to make sure the process is ended.


I fixed the issue by removing this file

~/.audacity-data/audacity.cfg

The other solutions here didn't work for me.

When I reopened Audacity, I noticed that there was an unsaved project I hadn't closed properly.

This is with Audacity 2.1.2 On Ubuntu 16.04 LTS.

I found the answer here: https://forum.audacityteam.org/viewtopic.php?p=190837#p190837

This appears to happen with older version of Audacity, too.