You clicked Firefox, expecting your homepage, and instead got an error popup telling you Firefox is already running but is not responding. The window never appears. This DevAnswers fix walks through finding the stuck Firefox process, terminating it cleanly, and removing the stale profile lock so the browser opens again, including the Snap-specific profile path that catches most Ubuntu 22.04 and later readers off guard.
Prerequisites
- Ubuntu on a desktop installation. The article covers two cases: Ubuntu 22.04 LTS and later (the Snap-default Firefox), and Ubuntu 20.04 or earlier (the historical deb-installed Firefox).
- A terminal. On GNOME-based Ubuntu,
Ctrl + Alt + Topens one. - A standard user account.
sudois not required because Firefox runs entirely in your per-user profile.
Method 1: Kill Stuck Firefox Processes
Firefox shows the “already running” error when a previous instance is still alive (often a background renderer or a process orphaned after a crash) but no window is visible. Confirm what is actually running first:
pgrep -a firefox
If pgrep prints one or more PIDs and command lines, those are the orphan processes. Send them SIGTERM with pkill:
pkill firefox
Re-run pgrep -a firefox to confirm nothing remains. If a process is still listed after a few seconds, the renderer is genuinely hung and SIGTERM was ignored. Escalate to SIGKILL only after SIGTERM has failed:
pkill -9 firefox
Now click the Firefox icon again. If it opens, you are done. If you still see the same error popup, the stale profile lock file is the cause.
Method 2: Remove the Stale Profile Lock File
Firefox prevents two instances from corrupting the same profile by creating a lock file inside the active profile folder when it starts. The file is named .parentlock (hidden dotfile) on Linux and macOS, and parent.lock on Windows; Mozilla’s support docs use parent.lock generically for both. A lock symlink accompanies it on Linux. If Firefox exits cleanly, the file is removed. If Firefox crashes or is killed mid-write, the file is left behind and the next launch refuses to open because the lock is still there.
On Ubuntu running a deb-installed Firefox, the profile directory is under ~/.mozilla/firefox/. Profile folders are named with a random suffix plus the word default or default-release. List them first to find the active one:
ls ~/.mozilla/firefox/
You will see entries such as a1b2c3d4.default-release and profiles.ini. Open profiles.ini with cat ~/.mozilla/firefox/profiles.ini if you have more than one profile: the entry containing Default=1 names your active profile. Now remove the lock files from that specific folder (substitute the real folder name for the placeholder; do not use a glob, which would also delete locks belonging to any other profile that happens to be running):
rm -f ~/.mozilla/firefox/PROFILE_FOLDER/.parentlock ~/.mozilla/firefox/PROFILE_FOLDER/parent.lock ~/.mozilla/firefox/PROFILE_FOLDER/lock
Try Firefox again. If you are on default Ubuntu 22.04 or later and the file is not there, you are looking in the wrong place: the Snap edition of Firefox stores its profile elsewhere.
Snap Firefox: Profile Path on Ubuntu 22.04+
From Ubuntu 22.04 LTS onwards, Canonical ships Firefox as a Snap package rather than a deb. Snap confinement means the browser cannot read or write the legacy ~/.mozilla/firefox/ directory at all. Snap-installed Firefox stores its user profile data under ~/snap/firefox/common/.mozilla/firefox/ instead. List the Snap profile folders, identify the active one the same way (via the profiles.ini sibling file under the Snap path), then remove the lock files from that specific folder. Substitute the real folder name; do not use a glob, for the same multi-profile-safety reason:
ls ~/snap/firefox/common/.mozilla/firefox/
rm -f ~/snap/firefox/common/.mozilla/firefox/PROFILE_FOLDER/.parentlock ~/snap/firefox/common/.mozilla/firefox/PROFILE_FOLDER/parent.lock ~/snap/firefox/common/.mozilla/firefox/PROFILE_FOLDER/lock
which firefox printing /snap/bin/firefox (or /usr/bin/firefox resolving to a Snap wrapper) means you are on the Snap edition. The same command printing /usr/bin/firefox on a system where dpkg -l firefox succeeds means you are on a deb install. Troubleshooting If the Error Persists
If pkill and lock-file removal both failed, two more options are worth trying.
Diagnose what is holding the lock. If something keeps recreating parent.lock the moment you delete it, a process you missed is still using the profile directory. The fuser command (from the psmisc package, installed by default on Ubuntu) prints the PIDs of processes using a given file. Point it at the exact parent.lock path from Method 2 above (deb path for Ubuntu 20.04 and earlier, Snap path for 22.04 and later) and substitute your actual profile folder name:
# Snap (Ubuntu 22.04+):
fuser ~/snap/firefox/common/.mozilla/firefox/PROFILE_FOLDER/.parentlock
# Or deb (Ubuntu 20.04 and earlier):
fuser ~/.mozilla/firefox/PROFILE_FOLDER/.parentlock
Kill whatever PIDs fuser returns, then re-try the lock removal.
Recover a corrupted profile via Profile Manager. If the profile itself is in a bad state (Firefox crashes immediately on launch, or the lock keeps regenerating without any process holding it), launch Firefox with the Profile Manager flag and create a new profile:
firefox --ProfileManager
The Profile Manager dialog lets you create a fresh profile and set it as default. Your old profile stays on disk untouched, so you can later sync over bookmarks and passwords once Firefox is stable. If neither method works, see our guide on cleanly rebooting Ubuntu as a last resort.
Next Steps
Snap-Firefox hangs are more common on systems behind on Snap refreshes; the Ubuntu update guide covers snap refresh alongside apt update. And if you keep hitting odd Ubuntu desktop popups in addition to this one, the Polkit color profile authentication fix covers another common one.
Comments