Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any real alternatives to force quit dialog on mac?

Alternative, just a command/app that kills every running app (not process)?

share|improve this question
It's hard to tell exactly what you're looking for, but would the Activity Monitor do what you are interested in? – Stephen Jul 18 '11 at 22:57
Nope, because I will still need to use it, while the system hangs – Tyilo Jul 18 '11 at 22:58
What can Task Manager do that Activity Monitor and Force Quit can't? – Nathan Greenstein Jul 18 '11 at 23:16
Not specifically Task Manager, but the dialog with logout, shutdown, task manager etc. – Tyilo Jul 18 '11 at 23:21
My question is why is your system hanging so much that you need to do this at all? – Digitalchild Jul 18 '11 at 23:24
up vote 3 down vote accepted

Found how to accomplish what i want:

  • Create spark applescript command doing do shell script "sudo killall loginwindow"
  • Edit /etc/sudoers to allow doing above without password prompt: Tyilo ALL=NOPASSWD:/usr/bin/killall
share|improve this answer
You might also enable ssh - prompt or other iOS ssh tool will often still get into a mac that can't exec an AppleScript. Even when loginwindow and/or finder are non-responsive, the force quit keystrokes have priority to bring up the force quit floating dialog – bmike Jul 19 '11 at 0:32

Here is a keyboard combo ⌘ ⌥ ESC (Command-Option-ESC or Command-Alt-ESC) what bring in a small Force quit window.

but, when your script every 0.25 sec clicking somewhere, you will lose focus on ANY window.

You can for example try in another terminal window the following

sleep $seconds ; killall "$script"

that small script will sleep 20 seconds, and after will kill all processes with the name "name_of_the_script".

Another variant is - rewrite you script for keypress check. For example, the next shell script will run until you press "q". Because you don't tell how you do "clicking" (via applescript? via iKey?) can't tell better solution.


do_stuff() {
        let cnt++
        echo "Doing stuff here $cnt"

#set terminal into nonblocking mode
stty -icanon
while [[ "$key" != "q" ]]
        read key

#resetting terminal into normal mode
stty sane
echo DONE
share|improve this answer

Your Answer


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.