Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
disown worked like a charm. –  chb Apr 28 '13 at 5:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.