Having fun with SSH, say and osascript!

October 8, 2010 at 2:30 pm Leave a comment

Playing nerdy tricks on people always fun, especially if they are on a mac and you have SSH access to their machine :)

Below are some cool commands you can execute via ssh to amuse or frustrate an unsuspecting mac user!

Absolutely nasty:

sudo kill [program id learned from top] 

Note: using ‘sudo open’ over ssh does not give the user super-user privileges for the opened application.

sudo halt

sudo reboot

sudo osascript -e 'tell app "[name of an open program]" to quit'

Power:

sudo osascript -e 'tell app "Finder" to sleep'

sudo osascript -e 'tell app "Finder" to shut down'

General:

sudo open /Applications/iChat.app

sudo osascript -e "set volume 0"

sudo osascript -e "beep"

sudo osascript -e 'display dialog "Did you know that you are annoying?" buttons "Yes" with icon note'

sudo osascript -e 'tell app "Finder" to quit'

sudo open [path to an application]

Speech:

sudo osascript -e 'say "[whatever]" using "Zarvox"'

sudo osascript -e 'say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"'

iTunes Control:

sudo open /Applications/iTunes.app; sudo osascript -e 'say "Play some music. Go on. I dare you." using "Zarvox"'

sudo osascript -e 'tell app "iTunes" to stop' -e 'say "Please stop playing your annoying music" using "Zarvox"'

sudo osascript -e 'tell app "iTunes" to next track' -e 'say "I did not like that song very much" using "Zarvox"'

sudo osascript -e 'tell app "iTunes" to fast forward' -e 'say "This song is boring" using "Zarvox"'

sudo osascript -e 'tell app "iTunes" to quit'

 

Thanks to momerath for typing these up so that I didn’t have to! Sourced from Here!

 

Entry filed under: Command line tools.., Operating System Tips. Tags: , , , , , , .

Macbook Pro – Swollen Battery [Fail] WEP + MAC Filtering – Why?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Trackback this post  |  Subscribe to the comments via RSS Feed


Flickr Pics

Cart Wheel at De Bortoli Winery

Cart at De Bortoli Winery

Dam at De Bortoli Wines

Stroll

XR6 Turbo

More Photos

Subscribe to my blog to receive email notifications of new posts!

Join 2 other followers


Follow

Get every new post delivered to your Inbox.