# Make .csh executable?



## TuffNut2Crack (Aug 18, 2003)

Is there a way to make a .csh script executable via the finder?  I've written this simple script:
#!/bin/csh
open /applications

And I want it to run through the finder.  I'm able to get it to work through the command line, but OS X recognizes it as a Photoshop shape file or something like that.  Setting Finder as the default application doesn't seem to work either.  Anyone know how to do this, or if it's even possible?


----------



## symphonix (Aug 18, 2003)

run the command:

chmod a+x myscript.csh 

I'd suggest renaming it to a TERM file, this can be run with a double-click from the finder.


----------



## TuffNut2Crack (Aug 18, 2003)

When I do that, it launches the terminal and crashes it.  You mean to rename it to .term, right?


----------



## symphonix (Aug 19, 2003)

Yeah, that's right ...

Hmm ... maybe if you just keave out the shebang line (#!/usr/bin/csh) ?


----------



## michaelsanford (Sep 17, 2003)

PS It looks like you're trying to open the /Applications folder when someone logs on.

Keep in mind that ~/.cshrc is called only when a shell starts, not when someone logs in on the console; so someone will get the Applications folder opened whenever the shell starts for that user regardless of who is logged in at the console...

If you're trying to open the /Applications folder when someone logs in to the console, just add an AppleScript to the Login Items menu.


----------



## michaelsanford (Sep 17, 2003)

This AppleScript will do the trick, save as a compiled script:


```
try
	do shell script "open /Applications"
end try
```


----------



## profx (Sep 18, 2003)

so will apple-shift-a

what exactly are you trying to achieve?


----------



## gumse (Sep 18, 2003)

rename it ty myscript.command
(and make it executable)


----------

