Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Recover from the Finder's spinning beachball Desktop
I got fed up of the old spinning beach-ball problem with a DVD that I had just inserted, so I thought I'd try something better than a reboot. You need to sudo to root for this one to work. Once you've done that, then type:
 % ps aux| grep Finder.app
Get the process ID (the first set of numbers in the output) and then type:
 % kill -HUP 1234
Replace 1234 with the actual process ID of the Finder from the first command. This will re-initialise Finder and gets rid of the beach-ball. BTW, this was on 10.2.4, so some of these Finder bugs are probably fixed, buts it's a tip worth knowing.

[robg adds: When the Finder locks up on me (hasn't happened yet in 10.3), I just use Command-Option-Escape to force it to re-launch; this works without requiring a trip to the Terminal. You may, however, have to switch from the Finder to another app before the Command-Option-Escape key sequence will be recgonized.]
    •    
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[15,431 views]  

Recover from the Finder's spinning beachball | 36 comments | Create New Account
Click here to return to the 'Recover from the Finder's spinning beachball' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Recover from the Finder's spinning beachball
Authored by: fabrizio on Jan 10, '04 09:25:21AM

In Panther, if Finder locks, you can control-click his icon in the Dock and choose "Force Quit".



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: jgmanning on Jan 10, '04 09:45:12AM

You can skip the "ps" step by using "killall":

sudo killall -HUP Finder



[ Reply to This | # ]
no need for the sudo
Authored by: JJ on Jan 10, '04 09:53:17AM

no need for the sudo, as you are probably the owner of your own Finder process ;-)



[ Reply to This | # ]
Use killall, no need for ps
Authored by: JJ on Jan 10, '04 09:51:48AM

to do this by name, instead of having to look up the processid, just type:

killall -HUP Finder

or if you want to see what would happen first:

killall -s -HUP Finder

and of course,

man killall

is your friend



[ Reply to This | # ]
And for those trying to learn shell command syntax
Authored by: nvdingo on Jan 10, '04 11:00:49AM

That's the vertical bar above the '\' key, not a lowercase L in the hint.

It's called a piped command, where the output of 'ps' with the options 'aux' is piped as the input into the command 'grep' which is trying to match the text Finder.app.

Just trying to help new shell users pick up some important syntax concepts, since most everything done in the shell relies on output from one command being sent directly to another command.

Many sysadmin tasks are completed by single strings of piped commands on a single line.



[ Reply to This | # ]
Why can I find e.g. top, pppd, etc. with this but not Finder, iTunes, etc.?
Authored by: hamarkus on Jan 10, '04 05:38:10PM

Why can I find e.g. top, pppd, etc. but not Finder, iTunes, etc. with this command 'ps aux | grep xxx'? It seems I can only find processes that 'are not owned by me', as in 'needing a sudo to kill them'.

BTW, thanks for the explanation, I've finally understood piping and the grep command.

Markus



[ Reply to This | # ]
Why can I find e.g. top, pppd, etc. with this but not Finder, iTunes, etc.?
Authored by: floop on Jan 10, '04 10:34:33PM

I tried "ps aux | grep Finder" and it did not work for me. What made it work was widening the window, strange. Seems like the line from ps is too long and gets clipped. I find that using ps axc works better to find process numbers.

Also capitalization is important. Use Finder, not finder.



[ Reply to This | # ]
Why can I find e.g. top, pppd, etc. with this but not Finder, iTunes, etc.?
Authored by: aranor on Jan 10, '04 11:47:12PM
If you do ps -auxww | grep -i Finder then it works fine. The 2 w's make it display all data regardless of window size, and the -i to grep makes it case-insensitive. Although, I'm not sure why you'd have a problem with window width when piping - I haven't verified it, but I was under the impression that piped commands ignored the terminal environment since its output wasn't being directed to the terminal.

[ Reply to This | # ]
Yep, window size is the decisive factor
Authored by: hamarkus on Jan 11, '04 06:03:55AM

Either increasing the window size, or using the 'auxww' option makes it display the result of the command. It's funny, I never changed any of the settings of the terminal (10.2.8 installation); when I open a new terminal window it briefly shows: 80x24 and comparing with the screen resolution, the default window should be about 500 pixel wide.



[ Reply to This | # ]
Yep, window size is the decisive factor
Authored by: aranor on Jan 11, '04 09:00:32AM

The 80x24 isn't pixels, it's rows and columns.



[ Reply to This | # ]
Why can I find e.g. top, pppd, etc. with this but not Finder, iTunes, etc.?
Authored by: nvdingo on Jan 11, '04 11:48:24AM

in order for grep to do a case insensitive match, do
`grep -i <pattern>`

do you want grep to show you everything but some pattern?
use -v

case insensitive restrict would be -iv (or -vi)

and of course, you can really narrow down your options by chaining your greps!

You are welcome.



[ Reply to This | # ]
All you Unix/Terminal experts, take a lesson!
Authored by: jiclark on Jan 11, '04 03:29:19PM

If everyone would try to be just a little more explicit with the directions in their comments, as nvdingo added, we newbies and wannabes would be so much better off!

I can't tell you how many times I've wished there was just a little more of an explanation of some terminal command that somebody recommended trying. I realize that it's just second -nature to most of you, but to the rest of us it's a whole new language. A bit of translation would go a *long* ways towards making this site so much better than it already is!!!

Hope I'm not being over-the-top about this. Thanks again, nvdingo, for taking the time to help out those of us less knowledgable about shell command syntax!!

John-o



[ Reply to This | # ]
Anyone asking for someone elses time, take a lesson!
Authored by: drc on Jan 11, '04 11:38:14PM

I suggest the following. The mind of those "experts" is nicely explored at the following webpage:

http://www.catb.org/~esr/faqs/smart-questions.html

For more information try running the " man " command before any cammand i.e. " ps " that you want to know what is does.
Good luck and always read the manual



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: adrianm on Jan 10, '04 11:10:44AM

Also, in Panther (maybe before), option+click on Finder in dock forces it to restart.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: johnq on Jan 10, '04 03:46:32PM

"Also, in Panther (maybe before), option+click on Finder in dock forces it to restart."

That's not quite right (I don't mean grammatically). Should have been:

Also, in Panther (maybe before), Option-click-and-hold on the Finder icon in the Dock reveals a "Relaunch" command in the pop-up menu.

Let's try to be exact for the sake of those trying to learn something new:

Option-clicking an icon other than the application you are currently in switches to that other application and hides all others.

Option-clicking on the icon for the application you are currently in will switch to the last used application, if any.

Once you have switched to an application via Option-clicking, you can return to the previous application by Option-clicking the icon again. It will forever cycle between the two applications.

Option-clicking any running application's Dock icon once switches to the previously used application and hides others. Option-clicking the same icon a second time brings you back again to the icon's application, hiding others applications.

Example:
- You are in Safari, iTunes is running.
- You Option-click the iTunes icon.
- It switches you to iTunes and hides all other applications
- If you then Option-click the the iTunes icon again it will switch you to Safari and hide iTunes and all other applications.

Option-clicking-and-holding on a running application's Dock icon will show the menu but changes "Hide" and "Quit" to "Hide Others" and "Force Quit" (except Finder which adds a "Relaunch" item because it doesn't normally have a "Quit" command). Releasing/pressing Option while the menu is exposed will show it toggle.

Command-clicking a Dock icon will open it's application's parent folder in the Finder and select the original application.

As a good habit to get into, adding Control to the mix will make the Dock menus open with no intentional delay. So anytime you want to make a Dock menu appear, whether by Option-click-and-hold or just click-and-hold, just instead add Control before you click.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: mistercow on Jan 10, '04 04:45:24PM

Option-clicking an application icon that is not open, or is not currently in the front does not hide all other applications. It hides the current application. So if you option click the icon for iTunes while Safari is in the front, it will switch to iTunes, and hide for Safari.

Option-clicking the current application icon hides the current application.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: fabrizio on Jan 10, '04 05:29:48PM

To hide all other apps you have to command-option-click the icon in dock. Option-click will hide only the active app.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: chabig on Jan 10, '04 11:12:29AM

Why in the world is any Jaguar user still running 10.2.4?



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: lixlpixel on Jan 10, '04 05:42:19PM
you can also have AppleScript do that for you.

tell application "Finder" to quit
delay 2
tell application "Finder" to activate
just save as "Relaunch Finder.scpt" in your Scriptmenu - and you have always a one-click solution

[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: eno on Jan 10, '04 10:00:00PM

Surely there must be plenty of other hints already on the site about how to exit hung processes...

But worse still, this hint contains factual inaccuracies. As already noted above, not only is this not the best or easy way to quit the Finder, but the comment about "sudo" being required is just plain wrong!

You should know better by now, Rob! You are a published author, regardarded as an expert. We expect better from you! (And I don't want to be too harsh, because the truth is that you do do a lot of really excellent work on this site...)



[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: ubrgeek on Jan 10, '04 10:12:46PM

I agree. ps -U [username] will give you the PID of whatever process you (as '[username]') are running. Then just kill whatever hung process you have created. Dropping into root (via 'su' or 'sudo') should really only be done as a worst-case scenario.



[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: babbage on Jan 11, '04 05:18:52PM

A hint here sloppily recommending unnecessary root usage? <irony>Shocking.</irony>

It's a familiar complaint, but Rob doesn't seem to be very interested in fixing the problem. Almost every hint that this site that publishes that begins with "log in as root" or "sudo to root" does not have to be done this way. Lots of people have complained that such advice is irresponsible, including myself, but these amateurish, half-correct hints keep getting published as is.

It's enough to make me, for one, take everything published here with a big grain of salt: each hint may contain at its heart a pretty clever idea, but more often than not the execution of that idea can and should be done in some much better way. A lot of the time, the suggested procedure is sloppy, risky, and inefficient, but that's how it's been for years now, and I don't see any reason to assume that the situation will ever improve at this point.

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

robg: I can't believe you posted this "hint"!
Authored by: Zo-1 on Jan 11, '04 09:22:36PM

Fork me, and here I've been assuming that "Works" implies accurately written. That accuracy is a given.

It's not?

Gee, Rob, but that kinda calls into question the integrity of all these hints, doesn't it? Of the site itself?

Oh well. Useful to this X beginner. To learn which sources are reliable, and which are not.



[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: babbage on Jan 12, '04 04:35:39PM
Fork me, and here I've been assuming that "Works" implies accurately written. That accuracy is a given.

It's not?

Ever heard of Rube Goldberg? He was an inventor that specialized in coming up with ridiculously elaborate ways to do simple things. Take, for example, his simplified pencil sharpener:

Open window (A) and fly kite (B). String (C) lifts small door (D) allowing moths (E) to escape and eat red flannel shirt (F). As weight of shirt becomes less, shoe (G) steps on switch (H) which heats electric iron (I) and burns hole in pants (J). Smoke (K) enters hole in tree (L), smoking out opossum (M) which jumps into basket (N), pulling rope (O) and lifting cage (P), allowing woodpecker (Q) to chew wood from pencil (R), exposing lead. Emergency knife (S) is always handy in case opossum or the woodpecker gets sick and can't work.

It'll work, I guess, but no one can seriously say that this is a "simple" way to sharpen a pencil.

Much of the advice published on this site comes across the same way that Goldberg's over-complex inventions did. Yes, most of them work, in that they will ultimately accomplish what they set out to accomplish, but more often than not there's a much more streamlined way to accomplish the same thing.

Moreover, any hint that tells the user to log in as root is playing with fire. Sometimes, that or something like it is necessary -- there are some things that just have to be done with elevated access priviliges. On the other hand, requesting these priviliges through sudo is usually more prudent than opening up a root shell, or god forbid activating the root account and logging into Aqua as root -- hint, THAT IS NEVER NECESSARY. EVER.

And in some cases, as this hint, the person submitting the hint tells people to log in as root for no reason at all. This hint is actually a clear example of the trend: the Finder, like most every other application most people run, is launched with your user account's ownership & priviliges. If it was running under a system account, then it would make sense to use root to tinker with it, but that's not the case here. Therefore, there's no reason at all to invoke root here, via sudo or otherwise. (Hint: if you do a ps -aux and the process you want to kill is running under your account, then you don't need root access to work with that process. Get it?)

Gee, Rob, but that kinda calls into question the integrity of all these hints, doesn't it? Of the site itself?

Well, in my opinion -- yes. Unfortunately.

Please don't get me wrong -- there's a lot of great material here! However, there's also a lot of landmines: hints suggesting doing irresponsible things, or accomplishing reasonable things in a sloppy way. It would be all to easy to pick up a lot of bad habits by copying everything you see here without developing an awareness of this kind of thing. And unfortunately for new users, I can see where this kind of thing might not be obvious.

Honestly, in my opinion, the best way to get a feel for this is either buy & read a great Unix book like Unix Power Tools, or find some good mailing lists or Usenet groups where there are experienced, knowledgable people to learn from. This site isn't a bad resource to turn to, but it really just skims the surface and never quite seems to put the pieces together in a coherent way. This is okay, as far as it goes, but it really helps to seek out a deeper understanding of things as well...

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

robg: I can't believe you posted this "hint"!
Authored by: aranor on Jan 12, '04 04:58:12PM

From your post it sounds like you're now going to assume that every hint is not accurate or the best way to do it. For the most part, hints are well-written and accurate and a decent way to achieve the objective. However, rob can't test every single hint and can't make sure that every single hint is described in the best way possible. So while this hint really doesn't need sudo (and in fact isn't the best way to do it either), it certainly doesn't mean all other hints suffer the same problems.

However, it would be nice if rob would remove hints like this that are pointed out to be inaccurate and not useful.



[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: Zo-1 on Jan 13, '04 12:39:50AM

Thanks to those who clarified the grain of salt. I agree with the philosophy, and find the posters here to be remarkably straightforward and helpful.

But this remains troubling.

>. . . it would be nice if rob would remove hints like this that are pointed out to be inaccurate and not useful.

It would be more than nice. I think this matters.






[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: robg on Jan 13, '04 02:04:29AM
Mistakes will be made here by yours truly. It's happened before, and it will happen again -- it's a fact of life, and I won't promise that it's not going to happen again. There's simply too great a volume of information to deal with to commit to 100% mistake-free hints. Hence, I rely on the comment system to help catch those mistakes, so that future readers will see both the original hint and the follow on comments.

However, since I'm only one person, there's no way I can read every one of the thousands of comments that are posted to the site -- it's all I can do to try to keep up with the submissions and the email requests for help, pointers, references, etc. As much as I'd love to read every comment on the site, I'd much rather use my very sparse free time to visit with my wife and daughter.

Hence, if you really want to get my attention about something, send me an email -- I wouldn't have even seen this thread if a user hadn't sent me an email.

With all that said, yes, there's a mistake in this hint -- you don't need sudo. Now that it's been noted in the comments, I don't really see the point in changing the original article -- if I do that, I might as well then delete all the comments, since they'd be redundant.

However, in those cases where a hint is (a) proven brutally wrong or (b) proven to be very dangerous, I will go back and either amend or delete the hint as appropriate. I do NOT feel this hint falls in to that category.

If you don't like my approach, nor believe in my rationale, then you are, of course, free to start another hints site with a different approach. I'll just continue to do my best, and hope it's good enough for the majority...

-rob.

[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: chabig on Jan 13, '04 10:45:38PM

"However, in those cases where a hint is (a) proven brutally wrong or (b) proven to be very dangerous, I will go back and either amend or delete the hint as appropriate. I do NOT feel this hint falls in to that category."

Rob, here's one that's brutally wrong, yet hasn't been deleted yet. How about taking another look at it please...

http://www.macosxhints.com/article.php?story=20031127211855401

Chris



[ Reply to This | # ]
robg: I can't believe you posted this "hint"!
Authored by: kupietz on May 07, '04 05:38:55PM

4 months later it's still posted, but I'm glad it is. It may be brutally wrong but the response comments contain a ton of interesting information which I learned some useful and important things from. This is a more valuable site for having that post still on it than it would be without it.

Maybe all this site needs is a disclaimer: "Read all comments. Follow any of these hints at your own risk." I'd rather have more information available but some of it possibly dodgy, and have it left up to me to learn and determine what's good, than a "baby-proofed" site with 100% accurate info that I already knew.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: floop on Jan 10, '04 10:43:03PM

Be careful killing a process in Panther this way with fast user switching enabled. I find that using "ps aux | grep Finder" in Panther will return a line for each user that is logged-in. You wouldn't want to kill someone else's process. This is also a good reason not to use sudo if it is not needed.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: aranor on Jan 10, '04 11:51:28PM
Then remove the 'a' and just use ps ux. Why are you using the 'u' anyway, if you're just trying to get the PID? You don't need that extra info. In fact ps xc works even better, because it strips out the path info and just shows the command (i.e. Finder). And if you *just* want the PID if the Finder running for your own user, try ps xc | grep Finder | awk '{print $1}'

[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: biedawo on Jan 11, '04 01:34:53AM
awk has its own pattern matching functionality... ps xc | awk '/Finder/{print $1}' (although the hints to use killall or MacOSX built-in force-quit are probably better)

[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: aranor on Jan 11, '04 09:01:43AM

I never really got around to learning awk :) Maybe I should...



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: phaedrus on Jan 12, '04 06:35:21AM

My spinning beachball experience in Panther makes this how-to-recover discussion worthless. Whenever the Finder decides to freeze ( beats me why it does so often), there is no way relaunching it. On my machine, that is. Kill the Finder and it will nerver return untill reboot. Becauce of it frequency it was forced to kill Panther's Finder permanent, and backed out to Jaguar. Why is the Finder doing this to me.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: aranor on Jan 12, '04 05:00:29PM

I will point out that most of the time the spinning beach-ball problem can be rectified just by waiting. It doesn't necessarily mean the application is frozen, it just means it's stopped accepting events for several seconds. It could just be really busy.

Anyway, the problem you describe makes it look like something was wrong with your installation. I suggest backing up all your important stuff, then doing a wipe and install of Panther and then restoring your stuff from backup.



[ Reply to This | # ]
Recover from the Finder's spinning beachball
Authored by: phaedrus on Jan 14, '04 09:40:32AM

and thats what I did, but in order to find what caused it I booted from a firewire carboncopy of Jaguar. (excelent pice of shareware). Now I can reproduce a non-responding-finder in Jaguar as well, where waiting for spinning ball is not going to workout. It is only an example; I experienced others. This is how I did. Booting into Jaguar; mount a volume using samba smb://x.x.x.x . A fresh Virex.dmg download from .mac is waiting to be mouted there. Mounting this .dmg will never happen. Killing Disk Copy will work, but you'll endup in a non-responsive-finder. Relaunch finder means killing it until reboot. Running apps will keep on going, but launching is impossible.
Sure Finder can be in trouble sometimes, but why is it unable to recover ?



[ Reply to This | # ]