tcsh shell problem?

TazmanDman

Registered
after attempting to install Xfree86 and XDarwin with failure, everytime I open my terminal app after it says "Welcome to Darwin!"

AND BELOW the welcome it says "Too many ('s. "

What does that mean?

-Taz
 
after 'too many ('s
do you get a shell prompt?

If not, try specifying another shell in Terminal.app
Here's how:
Open/launch terminal.app
go to the 'Terminal' menu.
Select 'Preferences'.

Click 'Shell'
see where it says 'Use this shell:' ? Select it, and type in a different shell.
Here are some shells defaultly installed on mac os x:
/bin/csh
/bin/sh
/bin/tcsh
/bin/zsh

tcsh and csh will likely not work. So give zsh or sh a shot.


Basically, here's what's happening:
Something edited your .tcshrc file, and they didn't do it right.

Once you get into a shell, type:
cd ~
ls -a
you'll see some 'dot files' (files starting with ., like .cshrc). Personally, I would move them like this:
mv .tcshrc .tcshrc.old
After you have zaped your .*rc files, try loading tcsh like this:
/bin/tcsh
if that works, then go back into the preferences, and selsct 'shell' and pick 'Use default login shell for this user'.

hope that helps, please tell me if it does!
 
i do get a prompt after the "Too many ('s"


after listing my hidden files with ls -a i get :

.
..
.cshrc
.java
.saves-261-localhost~
.saves-847-localhost~
.tcsh_history
.xinitrc

there are more, but they didn't seem to be in context of what you are looking for

it doesn't look like i have a .tcshrc file...

and I dont' understand zapping my *.rc is or does...sorry i'm a newbie ;)

so what do i move or change now?

oh, and it was me who has been doing some messing around with trying to install fink and other open source pre-compiled binaries ;)

thanks for your response!

-Taz
 
.cshrc could also be read at login... Try to take a look at it.

'tcsh' is a csh compatible shell anyway.

dani++
 
Ok, here's what I recomend:

at the terminal (of course!), type:
mv ~/.cshrc ~/.cshrc.old
Then quit the terminal and re-launch it, see if its all better now.


Here's why this may fix things:
When you start TheCShell (tcsh/csh), it reads a configuration file in your home directory called .cshrc (bash reads .bashrc, tcsh reads .tcshrs - I think...). The only reason I can think of for getting that sort of error on initialization of the shell would be an error with the init files, also called rc files. Whats rc stand for? I don't think anyone knows :p


If you want, post the contents of your .cshrc file, and we can go through that and edit it. But for a quick solution, just rename your .cshrc file. It shouldn't mess anything up.

BTW, to see the contents of ~/.cshrc:
cat ~/.cshrc

Hope we get this fixed up.
 
source /sw/bin/init.csh

That is what is in my .cshrc file... in my instructions to get Fink to work, I was told to edit this file like so it looks like this.

I've installed Fink but my terminal doesn't recognize any commands

I finally got XFree86 and XDarwin to work by downloading the precompiled source from sourceforge .... XFree86 4.2.0 and XDarwin 1.1 came together in a nice GUI package

I tried your mv command but I still get that weird message before my prompt

-Taz
 
Tha *is* strange.

I too have had troubles with fink (although not similar trouble). I've resolved to either compiling myself or downloading precompiled binaries.

Btw, here is the path for fink:
/sw/bin/fink
enter that into a terminal - and fink should pop up.

I think you have this stuff installed and its just not in your path. Here is my current path, its quite nice ;-) (the 'path', which is defined by $PATH, is where your shell program looks for the commands you type.):
Code:
/Users/liggett/bin:/usr/X11R6/bin:/Users/liggett/bin/powerpc-apple-macos:/Users/liggett/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib:/usr/local:.
Note that it is very important that '.' be the last item in your path (or just don't include '.' in it at all. But don't put it before anything).

Here's how to set your path variable under csh and csh-like shells:

Code:
setenv PATH [I]insert path here[/I]

Hope that helps.

Its funny how those fink developers got so pissed off that http://macosx.forked.net was taking fink installs and turning them into user-friendly Mac OS X .pkg installers. Hmm I wonder why forked.net decided fink was too complicated for most people... hmm..

--==I can't stand fink==--
 
OK. First of all, thanks for all of your responses...they have really helped... I think.

BUT, I have really messed it up now.... my PATH is ALL MESSED UP and I can't even run basic commands.... do you know what the default path is or should be from a basic tcsh shell?

I ran that directory path to fink...all i can get going is the fink help file...everything else doesn't work.....

How do I get my basic UNIX commands back??!!!

Lost and Confused,
Taz-
 
Ok, since my last post, I have made a little progress...

using /sw/bin/fink type commands, I somehow was able to install gimp using fink

at one point i had it where i didn't have to type in /sw/bin/fink to access a fink command, but now that is lost and I don't know how to get it back

but, for some reason I cannot sudo as root... since messing with my PATH file and losing all commands, I changed my terminal preferences and chose the "use this shell: tcsh" instead of the default....that gave me basic function again...

however, my sudo command doesn't work correctly and I'm still not back to normal yet....any suggestions?
 
You might just create a new user and begin working again from that account.


Be really careful with terminal. It is a really powerful tool but if you are not used to it it might end up this way or worse.


As far as fink goes, I use it everyday and I personally think it excellent. I think it might be that you did not edit the .cshrc file ok and it all went down from there.

Use sudo with care and really don't mess with path unless you really are sure what you are about to do. On any case, you can always use absolute paths to access apps: /bin/cat /usr/bin/... etc.

dani++
 
Here is the answer now that everone else has responded but they don't seem to know what specifically what you should do.

The tcsh's prefs on in a prefs file inside a folder called init. This folder is either in the library folder or the prefs folder located inside your home folder. Once you find the folder and open the only file in it you'll see that there is an opening ( without a closing ). Add the ) to the end of the line and save the file. Close the terminal window and open a new one the the and your problem is fixed. Also, you can add more directories to your path using this file. adding the SW and sw/bin directories is usefull for example. Good luck.
 
First things first: Fink is a worthless hack... get rid of it. That paren issue wasn't in /usr/share/init/tcsh/rc, it was in some stupid fink file it wanted to load so it could add its directory tree to your path.

Second: mv ~/.*cshrc ~/.cshrc.old; echo "source /etc/csh.cshrc" > ~/.cshrc

this blasts tcsh to virgin status....
I don't recommend editing your /usr/share/init/tcsh/rc only because its system-wide, and you don't want to mess things up for anyone else, or any new default users. This why we have ~/.*rc files, so that we can use system-wide defaults and add our own specific preferences (windows even caught on a little while ago, they just don't do it unix style)

Third: download bash for darwin, install it, make or grab an /etc/bashrc and a /etc/profile, and echo ". /etc/bashrc" > ~/.bashrc

go into Netinfo and change your shell.

-John
 
jcihocki...

Fink a worthless hack ?

Bullshit!!

I installed more than 200 packages and are all working fine...

It's very stupid to start messing with the terminal and poking the nose at X11 without learning and understandimg what you are doing.

Fink is one of the best things that came to the Mac. It's one of the easiest and most reliable programs to come out.

And at this very moment hundreds of Macintosh people are having their first taste of Unix thanks to fink.

Cheers...

PS: Your statement is like saying Photoshop is a rubbish, because you don't know how to use it.
 
Originally posted by TazmanDman
Ok, since my last post, I have made a little progress...

using /sw/bin/fink type commands, I somehow was able to install gimp using fink

at one point i had it where i didn't have to type in /sw/bin/fink to access a fink command, but now that is lost and I don't know how to get it back

but, for some reason I cannot sudo as root... since messing with my PATH file and losing all commands, I changed my terminal preferences and chose the "use this shell: tcsh" instead of the default....that gave me basic function again...

however, my sudo command doesn't work correctly and I'm still not back to normal yet....any suggestions?

my recommendation is reinstalling the OS first. If anything is really broken, that should fix it. You can run the installer from 10.1 CD, and get the updater from software update, I guess. That shouldn't delete anything you've installed yourself.

if you have .tschrc, .cshrc, .login. (or if you bothered to create ~/library/init/whatever/bleh, anything like that).. you should move it, then run terminal so it'll use default settings (don't tell me you changed that...) and see if you can run stuffs...

did you actually change PATH yourself?
 



Kilowatt wrote:
<< ts funny how those fink developers got so pissed off that http://macosx.forked.net was taking fink installs and turning them into user friendly Mac OS X .pkg installers. Hmm I wonder why forked.net decided fink was too complicated for most people... hmm..

--==I can't stand fink==-->>



How about if I take your work and sell it for profit, without even tell my customers that you did the work, and I just wrapped it in a nice color paper.

Fink developers are working for free, and they delivered a great sofware.

kilowatt, what is your contribution?

Before speaking bad of others, check the state of your own garden first.


Cheers...
 

This is your answer. Your shell preferences are in your home directory's library/init/tcsh directory. Try it. don't waste your time reinstalling the OS that's rediculas. Plus, you don't have to use install and use bash because tcsh is a fien shell. If you want to do that you can but jcihocki is giving much more to do than jsut simpley editing your shells preferences. Also, don't edit the tcsh file in the location that jcihocki gave because that is the prefernce file for every user of the shell. It doesn't address your problem.

Fink is a very good package manager. It's easy to use.
 
Finks problem on the mac is not that fink is hard to use. It doesn't take much to understand how to use it and it handles depencies very nicely. I think it's better then Red Hats package manager in this regard. The problem is that Mac users in general have to be the least literate and most phobic computer users. If it's not a simple double click then it's over there capabilities. Not that they could figure it out, but they perfer to set there own ability bar rather low and require that everyone else wrap around them.
 
danvtim

I hope this guys understand your message, and land back on earth.

TazmanDman,

I recommend you read and follow the excellent "XFree86 Install Guide" at:

http://www.macosxhints.com/

written by Rob Griffiths.

(Whenever you want to install again)

Cheers...
 
Sorry I haven't responded lately.... college keeps me busy ;)

I figured out that when I type 'tcsh' when I open a shell I can use the installed fink commands...otherwise fink doesn't work. Why does it do that? I thought that since I was running a tcsh shell anyways it would know? I think its because my default PATH is messed up in some way still....

I agree that most mac users aren't willing to do anything other than double-click....my father is the epitomy of an example. He's a graphic designer still in OS 9 and whenever I tell a few things he could do in OSX he flips out if there's a command line involved ;)

I will try to follow the advice of some of the posts here and I will come back..... thanks to all of you for your help....it sure is appreciated otherwise I would be lost ;)

-Taz
 
Back
Top