Terminal Problems

Yeeeeeeha

Registered
I open the terminal and am greeted by:

[Process completed]

I am unable to type anything. All I get is beeping when a key is pushed.

Any ideas?

-Y
 
or if you log in as another user does the sam thing happen?

have you made any changes to the tcsh rc files

depending on whether you are using

.cshrc
~/Library/init/tcsh/environment.mine.... etc.

.tcshrc

/etc/cshrc

/usr/share/init/tcsh/README

otherwise there have been some cases where for some reason the tcsh executable has been damaged.

so you can narrow down by

first check another user if that works, then your inits are screwed

if that doesn't work then either the system level stuff starting from
/etc/cshrc etc/login is screwed
or the binary is damaged.
 
Oh good, I thought it was something bad! ;-P

Thanks for the info!

I logged in as root and the same thing happens. I can't type in the terminal so I can't very well get to those directories. I've used tinker tool to unhide hidden files but I'm not sure what to do short of a new install if those files are wacked.

Could you suggest a course of action that would fix the issue?

Thanks!

-Y
 
There's likely to be a problem either with your shell init files (as described above) or your shell itself.

Fortunately, you can ask Terminal.app to use a different shell, for just such occasions.

Terminal->Preferences->Shell->Use this shell: /bin/sh

This will give you a very basic shell, which won't read most of you init files. It should allow you to explore the problem; my guess is that your shell itself is missing. Start off with an 'ls -l /bin/tcsh'

Good luck, and remember to change that radio button back when you're done.
 
Ok, great start! thanks for the clear info.

here is what I see when I type ls -l /bin/tcsh

-rwxr-xr-x 1 username unknown 0 Dec 31 1969 /bin/tcsh

Now, I know my battery is dead... irritating. :)

Does the "unknown" mean it doesn't know what group tcsh belongs to or that it doesn't belong to a proper group? Should I set this to admin if my hunch is right?

Thanks!

-Y
 
Hang on a second... It may be simpler than all that. There is an option in Terminal Preferences (under the shell tab) that reads something like:

When the shell exits:
- Always close the window
- Close the window when the shell exited cleanly
- Never close the window

IIRC, the default option here is to "Never close the window" which would require the standard way of closing the window (CMD-W, Clicking the close button, etc). The reason that I think this is the default is that I just rebuilt my iBook after it came back from repair (a different story), and I had a similar annoyance. Working with Linux/Solaris, I'm used to typing 'exit' and having the window disappear. Took me a minute to work out what I was seeing.

For that reason, I always set mine to "Always close...". The theory goes like this. For the shell to not exit cleanly is very unusual. In fact, I can't say I've ever seen a shell crash. Programs run from the shell... well, that's a different story... :)

Anyway, that's my $0.02...
 
Okay, that looks good. The "unknown" in the group field isn't actually a problem; if it really were an undefined GID, it would just show you that numerically. And in any event, it's executable by non-group-members.

So at least from a cursory ls, your /bin/tcsh looks fine. The next two steps would be:

try and manually invoke tcsh, and see if that works as expected. Just type /bin/tcsh from whichever shell you got working. If you get errors or it immediately exits, you'll need to look into problems with the binary or init files. If it works...

make double sure of what the shell defined for you in netinfo really is. "nidump passwd /" should show you the password database; your shell is the last field. Make sure it looks sane, doesn't have stray spaces in it, doesn't have weird line terminators, etc.
 
I tried your suggestions.

If I type /bin/tcsh I get:

zsh; exec format error: /bin/tcsh

When I type nidump psswd / I get

usage: nibump [-r] etc
known formats:
Aliases
bootptab
etc etc..

does this tell you anything?
 
-rwxr-xr-x 1 username unknown 0 Dec 31 1969 /bin/tcsh


size is zero it lost the date the uid/gid is whacked and the permissions are the only thing remotely OK.

you need to get a new copy of tcsh

while you are at it you boot into single user mode and run fsck

please leave your shell assignment to something which works.
 
Back
Top