# Desktop Icon to run terminal commands



## cjs1 (Jul 16, 2002)

I would like to create a Desktop Icon under OSX which will execute a series of terminal commands and on termination return back to the desktop.  I am sure this straight-forward can someone please advise where to start.

Thanks.


----------



## fbp_ (Jul 16, 2002)

save the commands you want to run as text using your favorite text editor

chmod +x to make it executable

then rename it and add .command as the file extension, double click and it should open terminal and run itself

it might leave the focus on the terminal though, im not sure


----------



## cjs1 (Jul 16, 2002)

Thanks very much - obvious when you know how.


----------



## gatorparrots (Jul 22, 2002)

Append this command to the end of your script to return to the Finder after it has finished running:
*open /System/Library/CoreServices/Finder.app*


----------



## uoba (Jul 23, 2002)

Can someone give me an example of the text file for this?


----------

