Hutta
12-30-2002, 09:45 PM
I'm trying to run a shell (perl, actually) script from finder, so I've added .command to the end of the filename, which works beautifully.
The only problem is that the terminal window that gets created to run my .command doesn't obey my defined preference for "When the shell exits: Close only if the shell exited cleanly." The windows stays open with the "[Process Completed]" Message. If I select this window and look up that option, it is set to the default "don't close the window".
I'm running 10.2.3, and I have chosen "Use settings as defaults" All new shell windows are killed when bash/tcsh/etc exits... The problem seems to only show up when clicking on .command files from finder.
Warning to others: I tried launching the .command file from finder, then tweaking the options (File --> Show Info) while that terminal window was selected, then chose "Use settings as defaults." Don't ever do this. =) The command I was running was stored in my preferences file, and nothing I did would restore it back to a regular shell. The options in the Terminal --> Preferences menu were still pointed at my shell, and no amount of toggling them back and forth made any difference. However, at this point the "Kill this window when shell exits" option /did/ take effect and it was a pain in the ass to get a shell back. So, if this happens to you: Use File --> Run Command and type in your shell... Make sure to click "run in shell" or for some reason it still runs the .command file and kills the window when it exits. Once you have a shell, you can nuke or manually fix up ~/Library/Preferences/com.apple.Terminal.plist This seems to be the only way to get Terminal running a shell again.
Anyway... Anyone know how I can get these windows to die when the .command exits?
The only problem is that the terminal window that gets created to run my .command doesn't obey my defined preference for "When the shell exits: Close only if the shell exited cleanly." The windows stays open with the "[Process Completed]" Message. If I select this window and look up that option, it is set to the default "don't close the window".
I'm running 10.2.3, and I have chosen "Use settings as defaults" All new shell windows are killed when bash/tcsh/etc exits... The problem seems to only show up when clicking on .command files from finder.
Warning to others: I tried launching the .command file from finder, then tweaking the options (File --> Show Info) while that terminal window was selected, then chose "Use settings as defaults." Don't ever do this. =) The command I was running was stored in my preferences file, and nothing I did would restore it back to a regular shell. The options in the Terminal --> Preferences menu were still pointed at my shell, and no amount of toggling them back and forth made any difference. However, at this point the "Kill this window when shell exits" option /did/ take effect and it was a pain in the ass to get a shell back. So, if this happens to you: Use File --> Run Command and type in your shell... Make sure to click "run in shell" or for some reason it still runs the .command file and kills the window when it exits. Once you have a shell, you can nuke or manually fix up ~/Library/Preferences/com.apple.Terminal.plist This seems to be the only way to get Terminal running a shell again.
Anyway... Anyone know how I can get these windows to die when the .command exits?