Terminal Won't Open

Joined
May 24, 2010
Messages
2
Reaction score
0
Points
1
Sorry, this is probably a really simple answer, but I was not able to find anything about this anywhere.

I am trying to run Terminal. However, I previously created a script that ends in
>killall Terminal
Now when I try to run Terminal it runs this script (even though I open the application itself, not the script I created), which forces it to then close itself. I can't do anything else in Terminal now. How can I fix this?

My next question involves why I have
>killall Terminal
in my script to begin with. The only thing I could find online dealing with closing Terminal automatically is the exit command, which exits the shell. The option in Window settings, however, does not work to close the window when the shell exits (as soon as I close a Terminal window the option reverts to "Never" [close Terminal window when]). The killall command was the only thing I could think of to close Terminal, but apparently it wasn't a good idea. My ultimate goal is to have a file on my desktop that I can open which opens Terminal, runs the commands, then closes Terminal.

I am running OS X 10.4.11.

Thank you for helping a newbie!
 
Joined
Oct 3, 2009
Messages
2,641
Reaction score
26
Points
48
Location
Albuquerque, New Mexico
It seems that the >killall Terminal command remained in there when you closed out Terminal. Am I right?
 
OP
I
Joined
May 24, 2010
Messages
2
Reaction score
0
Points
1
It seems that the >killall Terminal command remained in there when you closed out Terminal. Am I right?
I'm not quite sure what you mean. I let the command run all the way through, and the killall killed Terminal, not me. It just runs that script automatically whenever I first open Terminal.

I did, however, go back into the script that it keeps running and remove the killall command (I don't know why I didn't think of this before). When running a .command file, Terminal automatically adds an exit command after the process, so when I use File --> New Shell (or just click the Terminal icon in the dock) it exits the window regardless (I have not clue why it closes the window now but it wouldn't before). I have to use File --> New Command and work through there. I also tried changing the name of the file, but it just recognizes that it's not there and still sticks that exit at the end.
 
Joined
Aug 2, 2010
Messages
1
Reaction score
0
Points
1
I have the exact same problem. I tried running a script that automatically opens the terminal and runs a program. Now it always happens whenever I open a terminal it automatically runs this program (regardless of how i open the terminal) and then exits (which was never part of the script). If anyone found a PERMANENT solution I'd like to hear it, but for now I just Ctrl-z out of the program and use the terminal normally (works better than file --> new command)
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Go to Terminal > Preferences > Settings > Shell > Startup. Under the startup heading is a check box for "Run Command". Is there something set to run at startup?
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
Check your .profile in your home directory, do you have any scripts running from there?

(If you turn on hidden files for Finder, or use muCommander, of course)
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Try this: go to /Users/YOU/Library/Preferences and drag com.apple.Terminal.plist to the desktop.
Does Terminal run now? If so, delete the file you put on the desktop.
You're gonna have to reset your Terminal preferences if you made any changes.
 
Joined
Aug 25, 2010
Messages
1
Reaction score
0
Points
1
malloc problem when i open my Terminal

Hi there,
When i open my Terminal, i take this message many times


login(13852) malloc: *** mmap(size=4063817728) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

Any help?

Thanks
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top