Skip to content

Instantly share code, notes, and snippets.

@aravezskinteeth
Created May 3, 2023 19:58
Show Gist options
  • Save aravezskinteeth/95051ca2d1759d08f99d64201391d8c9 to your computer and use it in GitHub Desktop.
Save aravezskinteeth/95051ca2d1759d08f99d64201391d8c9 to your computer and use it in GitHub Desktop.
[Skhd] Could not lock pid-file! abort...

How did you get this fixed. Could you elaborate more?

Yes, I solved this permanently and I don't have to use sudo anymore.

Enable root password

  1. Open Spotlight with cmd + space
  2. Type Directory Utility.app
  3. Click the lock icon, then enter your admin account name and password.
  4. Click on Edit--> Enable Root User in the menu bar. Then enter the password that to want to use and save it on a note.

Enable user permissions to the /private/tmp directory

  1. Open Finder
  2. Press shift + cmd + G
  3. Type /private/tmp/
  4. Right click on the skhd_username.pid file --> Get Info.
  5. At the bottom, click on the lock icon and write your admin user and password and enable permission to your own user:
  6. Click on the + button if you don't see your user name.

SCR-20230309-fd0

Note: I don't remember if I uninstalled skhd before doing this, so if it doesn't work you could try that first, and then doing this.

Also, I had to enable a root password, because it wouldn't let me change permissions not even using the chmod -R 755 command.

You can see here the /private/ directory with all of its permissions enabled bc I tested this command on the terminal after enabling root password.

SCR-20230309-f9a

And here are the permissions for my /private/tmp/ directory in which I had enabled only write and read user permissions.

SCR-20230309-fgs

@mo-dayyeh
Copy link

I tried that , still not helpful , my macOS is sonoma , some control works and some don't and I keep getting that same error , I checked all permissions , I'm using yabai with skhd

@aravezskinteeth
Copy link
Author

I tried that , still not helpful , my macOS is sonoma , some control works and some don't and I keep getting that same error , I checked all permissions , I'm using yabai with skhd

Yeah i figured it wouldn't work on Sonoma. I used these instructions on MacOS Monterrey on an Intel Mac. I have bought a refurbished M1 mac with sonoma but I haven't tried to install yabai and skhd yet, but I'll do it later, when I finish my thesis. If I find a way on how to fix it, I'll update this thread. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment