Skip to main content
30 events
when toggle format what by license comment
Sep 18, 2023 at 23:51 comment added forresthopkinsa Starting in macOS Ventura, I now have to toggle on Allow notifications when mirroring or sharing the display if I want notifications to show when using external monitors (even when not mirroring)
Jun 14, 2023 at 18:45 comment added ijoseph @noɥʇʎԀʎzɐɹƆ was wondering that too, but display notification doesn't appear to take an image parameter, just title, subtitle, and sound name
May 12, 2022 at 15:49 comment added joseph I had to kill the "Notification Center" process which restarts automatically, before the notification started popping up.
Jun 23, 2021 at 16:17 review Suggested edits
Jun 23, 2021 at 17:36
Apr 4, 2021 at 16:37 comment added grg @Alik Please read answer, specifically: ‘AppleScript can be run from the shell using /usr/bin/osascript’
Apr 4, 2021 at 16:04 comment added AlikElzin-kilaka On Mac 11.2.3: zsh: command not found: display
Dec 13, 2017 at 22:39 comment added 425nesp Seems like sound name doesn't allow you to play custom sounds in ~/Library/Sounds anymore. Anybody know a fix? Using macOS 10.13.2.
Oct 8, 2016 at 18:39 comment added noɥʇʎԀʎzɐɹƆ custom image for notification?
Apr 2, 2016 at 20:49 comment added grg @Dan Clicking a notification is never a dismiss action, which is why Script Editor is launched when clicking. You can dismiss a banner with a two finger swipe whilst hovering it. I may look into alternatives if I have time at some point.
Apr 2, 2016 at 20:45 comment added Dan As Vic Jang mentioned but did not clearly explain, you can change the settings for how the notifications are displayed via System Preferences > Notifications > Script Editor > change from "Banners" to "Alerts". That way you can at least click "Close" instead of seeing the Open File dialog when you dismiss the notification.
Mar 26, 2016 at 23:52 comment added Schlueter display notification isn't working for me on El Capitan, although display alert works fine. The documentation claims both work. Any insight into this?
Dec 12, 2015 at 11:14 comment added mivk Note that the text has to be in double quotes. Single quotes don't work. So if you need a variable in the text, you cannot write "display ... '$mytext' ...", but need escaped double quotes: "display notification \"$mytext\" ...".
Nov 7, 2015 at 0:31 comment added Vic Jang Ladies and gentlemen, after an hour of investigation on the world wide web, I have found out how to let the notification window stay until dismissed by user! It was actually controlled by a setting in System Preference, rather than some parameter in the script written. These two images should explain it all i.imgur.com/cNOqFyX.jpg i.imgur.com/i8oyoan.jpg Have fun guys, and thanks @grgarside for the great answer.
Jul 22, 2015 at 20:11 comment added Pat Nothing I've found indicates that there's a way to control the action (what happens when you click on the notification). macosxautomation.com/mavericks/notifications/01.html is handy, FYI.
Jul 7, 2015 at 3:46 comment added NedStarkOfWinterfell Couple of questions - 1. Any way I can add certain actions on click of the notification? Say I want to run a certain shell script. I am on Yosemite, and it launches file browser. 2. How do I customize the notification with more options, like show a button within at the side on hovering over it, like what happens when the next iTunes song autoplays and notification appears showing that song, or when you click on the notification when you have a new message, two options come up - Send and Cancel?
May 7, 2015 at 20:31 comment added saruftw How do I add a time limit for the notification to exist on the screen ?
Apr 1, 2015 at 22:15 comment added Sridhar Ratnakumar Is it possible to make the notificatiop popup exist forever (not auto-hide after N seconds) until explicitly clicked by the user?
Dec 30, 2014 at 20:25 history edited grg CC BY-SA 3.0
never added the final 10.10 notification—now done
Sep 20, 2014 at 10:44 history edited grg CC BY-SA 3.0
added 458 characters in body
Aug 13, 2014 at 20:57 comment added ɹoƃı The only problem with display notification is that when you click on it, the open file dialog appears.
Jun 24, 2014 at 18:07 history edited grg CC BY-SA 3.0
added 522 characters in body
May 2, 2014 at 18:32 comment added grg @ceilingcat This is AppleScript. To run it in Terminal, use osascript (see answer).
May 2, 2014 at 18:31 comment added ceiling cat I got -bash: display: command not found My path is kind of screwy though, so it would be nice to know exactly where display is located.
May 2, 2014 at 18:11 comment added grg @ceilingcat Could you clarify what you mean? What doesn't work?
May 2, 2014 at 18:09 comment added ceiling cat What is the path of display? I have Mavericks but I can't see to find it. Thanks!
S Apr 25, 2014 at 14:13 history suggested gregers CC BY-SA 3.0
Wrap as a command-line script
Apr 25, 2014 at 14:11 review Suggested edits
S Apr 25, 2014 at 14:13
Dec 29, 2013 at 19:23 vote accept Nathan Greenstein
Dec 29, 2013 at 14:23 history edited grg CC BY-SA 3.0
added 52 characters in body
Dec 29, 2013 at 13:46 history answered grg CC BY-SA 3.0