Say I want to start Safari on my Mac. Can I create a pop up message that reads, "Use Chrome instead" or some other thing?

I presume it may be possible with Applescript or something, but don't know where to start on teaching myself how to do this.

1 Answer 1


Run EDITOR=nano crontab -e and add a line like this:

* * * * * pgrep -xq Safari && terminal-notifier -title 'Click to quit Safari and open Chrome' -message '' -group cronsafari -activate com.google.Chrome -execute 'osascript -e "quit app \"Safari\""' > /dev/null

The command is run about once per minute, and the notifications are shown repeatedly as long as there is a process named Safari.

You can install terminal-notifier with sudo gem install terminal-notifier.

You must log in to answer this question.

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