0

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

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

7
  • 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, 2011 at 22:57
  • Nope, because I will still need to use it, while the system hangs
    – Tyilo
    Jul 18, 2011 at 22:58
  • What can Task Manager do that Activity Monitor and Force Quit can't? Jul 18, 2011 at 23:16
  • Not specifically Task Manager, but the dialog with logout, shutdown, task manager etc.
    – Tyilo
    Jul 18, 2011 at 23:21
  • My question is why is your system hanging so much that you need to do this at all? Jul 18, 2011 at 23:24

2 Answers 2

3

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
1
  • 2
    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, 2011 at 0:32
0

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

seconds=20
script="name_of_the_script"
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.

#!/bin/bash

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

#MAIN LOOP
#set terminal into nonblocking mode
stty -icanon
key=''
while [[ "$key" != "q" ]]
do
        read key
        do_stuff
done

#resetting terminal into normal mode
stty sane
echo DONE

You must log in to answer this question.

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