Unlocking your Chrome/Edge profile on Linux

Symptoms

  1. Google Chrome or Microsoft Edge fails to launch from the Menu on your Linux desktop or in Remote Access Portal (RAP), without giving an error message.
  2. If you run google-chrome or microsoft-edge (respectively) at the command line, you get an error such as this:

    Unable to show message box: Google Chrome - The profile appears to be in
    use by another Google Chrome process (3227733) on another computer
    (mystique.maths.ox.ac.uk). Chrome has locked the profile so that it
    doesn't get corrupted. If you are sure no other processes are using this
    profile, you can unlock the profile and relaunch Chrome.
  3. If you look in ~/.config/google-chrome/ or ~/.config/microsoft-edge/ (respectively), you see symlinks named SingletonCookie, SingletonLock and/or SingletonSocket:

    $ ls -l ~/.config/google-chrome/Singleton*
    lrwxrwxrwx 1 youruser youruser 19 Feb 18 14:28 /home/youruser/.config/google-chrome/SingletonCookie -> 2480223369875263811
    lrwxrwxrwx 1 youruser youruser 28 Feb 18 14:28 /home/youruser/.config/google-chrome/SingletonLock -> mystique.maths.ox.ac.uk-3227733
    lrwxrwxrwx 1 youruser youruser 46 Feb 18 14:28 /home/youruser/.config/google-chrome/SingletonSocket -> /tmp/.com.google.Chrome.hISUlS/SingletonSocket

Possible Causes

This indicates one of two things:

  1. The browser is still running on the given machine, or
  2. The browser was previously running on that machine and it failed to shut down cleanly.

Because we use networked home directories (shared between machines), you can only run each browser on one machine at a time.

Solution

Use the commands listed above (google-chrome, microsoft-edge or ls -l <path>) to find out which machine currently holds the lock.

If you are still logged into that machine (whether locally or remotely), return to it and close the browser. That will unlock your profile for use on other machines.

If you aren't able to do that, you can use SSH to connect to the machine, check what you are running, forcibly close the browser if it is still running, and manually delete the lock files:

# Connect to the machine
ssh <youruser>@<hostname>

# Check what is running (optional)
ps xf

# Forcibly close the browser
killall chrome
killall msedge

# Delete the lock files
rm -f ~/.config/google-chrome/Singleton{Cookie,Lock,Socket}
rm -f ~/.config/microsoft-edge/Singleton{Cookie,Lock,Socket}

To prevent it happening again, we recommend you close the browser window whenever you have finished using it, and especially before disconnecting from a remote session (e.g. RAP).

Multiple Profiles

In the rare case that you need to run the same browser on multiple machines at once, you can use a separate profile instead - for example, in the local scratch directory:

mkdir -p /scratch/$USERNAME
chmod 700 /scratch/$USERNAME

google-chrome --user-data-dir="/scratch/$USERNAME/google-chrome"
microsoft-edge --user-data-dir="/scratch/$USERNAME/microsoft-edge"

Note that you won't have access to your normal bookmarks, history, etc.

You can delete the extra profiles later if you don't need to keep them:

rm -rf "/scratch/$USERNAME/google-chrome"
rm -rf "/scratch/$USERNAME/microsoft-edge"

You are reminded to limit the number of machines you use at once, to ensure there is capacity for other users.

Last updated on 25 Mar 2025, 2:16pm. Please contact us with feedback and comments about this page.