2

For some reason, Finder is no longer running and will not relaunch using conventional methods.

I can, however, get it running with the following command in the Terminal:

prompt$ open -g /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder &

Despite the fact that I'm ending the command with an ampersand and passing the -g flag to open, the resulting Finder opens attached to a completely new Terminal window that, when closed, causes the Finder application to also exit.

How can I relaunch the Finder from the Terminal, ensuring that it will run in the background without spawning a new shell?

6

The open command exits after it opens Finder. Even if it didn't, closing a shell would close background processes. You could try using disown:

/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder & disown $!

Or launchctl submit:

launchctl submit -l my.finder /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder

launchctl remove my.finder removes the job.

Have you looked at log messages or crash reports? If you have tried to load or unload /System/Library/LaunchAgents/com.apple.Finder.plist, try removing entries for Finder in /var/db/launchd.db/com.apple.launchd{,.peruser.501}/overrides.plist.

  • disown worked like a charm. – chb Apr 28 '13 at 5:04
  • 1
    & disown $! .. This answer saved my life. – CopyJosh Jan 5 '18 at 14:57
  • Holy! You are a true hero! – andreas Jan 4 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .