Notifications via the terminal

Oh man! This will be a very handy tool to have.

At work I use Apple Remote Desktop to manage the school’s computers.

One of the features of Remote Desktop is the ability to run shell scripts on any or all of the machines.

Sometimes, my shell-script-fu is weak, but I know how to do it with Applescript.

But, Remote Desktop doesn’t allow me to run an Applescript in the same way. That is, I can’t send a string of Applescript commands to a machine over the network, and have it do the bidding of the Applescript.

I have created some Applescripts and I’ve saved them as applications, which I then trigger from Remote Desktop. But, sometimes, I need to just do a one-off task, and don’t want to write the script, save it as an application, copy the application to all the Macs, and then run the application.

In the past, I’ve seen ways to wrap an Applescript in a shell script, but I haven’t used that before.

I have a task now, where I want to have the computers tell me their names. I was thinking of modifying a script that creates a text document, identifying the computer by name, and then sends a print job from each computer.

But, I thought, what about this fancy Notification Center. Can I tap into that?

Turns out the answer is yes!

How can I trigger a Notification Center notification from an AppleScript or shell script?

(Via Ask Different as Stack Exchange.)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s