FAQ revision 69408
143412Snewton
243412SnewtonLast Updated: 
343412SnewtonFri Aug 25 13:27:45 EDT 2000
443412Snewton
543412SnewtonThis is for people who do not read the manual!
643412Snewton
743412SnewtonSo far people who don't read manuals don't read this either... I may
843412Snewtoncall it README.*PLEASE* in the future, but then the same people won't
943412Snewtonbe able to get ftp it... :-)
1043412Snewton
1143412Snewton1.  Why is the meta key broken in tcsh-5.20 and up? 
1243412Snewton
1343412Snewton    On some machines the tty is not set up to pass 8 bit characters by default.
1443412Snewton    Tcsh 5.19 used to try to determine if pass8 should be set by looking at
1543412Snewton    the terminal's meta key. Unfortunately there is no good way of determining
1643412Snewton    if the terminal can really pass 8 characters or not. Consider if you are
1743412Snewton    logged in through a modem line with 7 bits and parity and your terminal 
1843412Snewton    has a meta key. Then tcsh 5.19 would set wrongly set pass8.
1943412Snewton
2043412Snewton    If you did like the previous behavior you can add in /etc/csh.login, or
2143412Snewton    in .login:
2243412Snewton
2343412Snewton    if ( $?tcsh && $?prompt ) then
2443412Snewton	if ( "`echotc meta`" == "yes" ) then
2543412Snewton	     stty pass8
2643412Snewton	endif
2743412Snewton    endif
2843412Snewton
2943412Snewton    If you don't have pass8, maybe something like
3043412Snewton
3143412Snewton	stty -parity -evenp -oddp cs8 -istrip   (rs6000)
3243412Snewton    or
3343412Snewton	stty -parenb -istrip cs8 
3443412Snewton    
3543412Snewton    would work..
3643412Snewton
3743412Snewton    Finally, tcsh will bind all printable meta characters to the self
3843412Snewton    insert command. If you don't want that to happen (i.e. use the printable
3943412Snewton    meta characters for commands) setenv NOREBIND.
4043412Snewton
4143412Snewton2.  I ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in cbreak 
4243412Snewton    and no echo mode?
4343412Snewton
4443412Snewton    These programs are broken. Background jobs should not try to look at the
4543412Snewton    tty. What happens is that dbxtool looks in stderr to inherit the tty
4643412Snewton    setups, but tcsh sets up the tty in cbreak and -echo modes, so that it
4743412Snewton    can do line editing. This cannot be fixed because tcsh cannot give away
4843412Snewton    the tty. A work-around is:
4943412Snewton
5043412Snewton    dbxtool < /dev/null >& /dev/null &
5143412Snewton    or
5243412Snewton    /usr/etc/setsid dbxtool &
5343412Snewton
5443412Snewton    If that does not work, for dbxtool at least you can add "sh stty sane"
5543412Snewton    in your .dbxinit
5643412Snewton
5743412Snewton3.  I tried to compile tcsh and it cannot find <locale.h>?
5843412Snewton
5943412Snewton    Your system does not support NLS. Undefine NLS in config_f.h and it
6043412Snewton    should work fine.
6143412Snewton
6243412Snewton4.  Where can I get csh sources? 
6343412Snewton
6443412Snewton    Csh sources are now available with the 4.4BSD networking distributions.
6543412Snewton    You don't need csh sources to compile tcsh-6.0x.
6643412Snewton
6743412Snewton5.  I just made tcsh my login shell, and I cannot ftp any more?
6843412Snewton
6943412Snewton    Newer versions of the ftp daemon check for the validity of the
7043412Snewton    user's shell before they allow logins. The list of valid login
7143412Snewton    shells is either hardcoded or it is usually in a file called
7243412Snewton    /etc/shells. If it is hard-coded, then you are out of luck and
7343412Snewton    your best bet is to get a newer version of ftpd. Otherwise add
7443412Snewton    tcsh to the list of shells. [For AIX this file is called 
7543412Snewton    /etc/security/login.cfg]. Remember that the full path is required.
7643412Snewton    If there is no /etc/shells, and you are creating one, remember to
7743412Snewton    add /bin/csh, /bin/sh, and any other valid shells for your system,
7843412Snewton    so that other people can ftp too :-)
7943412Snewton
8043412Snewton6.  I am using SunView/OpenWindows and editing is screwed up. In 
8143412Snewton    particular my arrow keys and backspace don't work right. What 
8243412Snewton    am I doing wrong?
8343412Snewton
8443412Snewton    Well, cmdtool tries to do its own command line editing and the
8543412Snewton    effect you get is one of using an editor inside an editor. Both
8643412Snewton    try to interpret the arrow key sequences and cmdtool wins since
8743412Snewton    it gets them first. The solutions are in my order of preference:
8843412Snewton
8943412Snewton	1 Don't use suntools
9043412Snewton	2 Use shelltool instead of cmdtool.
9143412Snewton	3 Unset edit in tcsh.
9243412Snewton
9343412Snewton6b. On a SPARCstation running Solaris 2.x and OpenWindows 3.1,
9443412Snewton    inside a cmdtool, the short-cut key sequence to clear log
9543412Snewton    (i.e. Meta-e or Diamond-e) doesn't work: it just echos 'e'
9643412Snewton
9743412Snewton6c. On a SPARCstation running Solaris 2.x and OpenWindows 3.1,
9843412Snewton    maketool (within SPARCworks) doesn't work: it just does
9943412Snewton    a `cd' to the working directory then stops.
10043412Snewton
10143412Snewton    The workaround for 6b and 6c is doing "unset edit."
10243412Snewton    Using shelltool instead of cmdtool doesn't fix 6c.
10343412Snewton
10443412Snewton7.  I rlogin to another machine, and then no matter what I tell 'stty'
10543412Snewton    I cannot get it to pass 8 bit characters?
10643412Snewton
10743412Snewton    Maybe you need to use 'rlogin -8' to tell rlogin to pass 8 
10843412Snewton    bit characters.
10943412Snewton
11043412Snewton8.  Where do I get the public domain directory library?
11143412Snewton  
11243412Snewton    Anonymous ftp to prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
11343412Snewton
11443412Snewton9.  I compiled tcsh using gcc, and when I start up it says:
11543412Snewton    tcsh: Warning no access to tty (Invalid Argument).
11643412Snewton    Thus no job control in this shell
11743412Snewton
11843412Snewton    Your <sys/ioctl.h> file is not ansi compliant. You have one of 3 choices:
11943412Snewton	a. Run fixincludes from the gcc distribution.
12043412Snewton	b. Add -traditional to the gcc flags.
12143412Snewton	c. Compile with cc.
12243412Snewton
12343412Snewton10. I compiled tcsh with the SunOS unbundled compiler and now things 
12443412Snewton    get echo'ed twice. 
12543412Snewton
12643412Snewton    It is a bug in the unbundled optimizer. Lower the optimization level.
12743412Snewton
12843412Snewton11. How can I use the arrow keys with hpterm?
12943412Snewton    Hp terminals use the arrow keys internally. You can tell hpterm not
13043412Snewton    to do that, by sending it the termcap sequence smkx. Since this
13143412Snewton    has to be done all the time, the easiest thing is to put it as an
13243412Snewton    alias for precmd, or inside the prompt:
13343412Snewton
13443412Snewton    if ($term == "hp") then
13543412Snewton	set prompt="%{`echotc smkx`%}$prompt"
13643412Snewton    endif
13743412Snewton
13843412Snewton    Note that by doing that you cannot use pgup and pgdn to scroll...
13943412Snewton    Also if you are using termcap, replace "smkx" with "ks"...
14043412Snewton
14143412Snewton12. On POSIX machines ^C and ^Z will do not work when tcsh is a login
14243412Snewton    shell?
14343412Snewton    Make sure that the interrupt character is set to ^C and suspend
14443412Snewton    is set to ^Z; 'stty -a' will show you the current stty settings;
14543412Snewton    'stty intr ^C susp ^Z' will set them to ^C and ^Z respectively.
14643412Snewton
14743412Snewton13. I am trying to compile tcsh and I am getting compile errors that
14843412Snewton    look like:
14943412Snewton
15043412Snewton    >sh.c:???: `STR???' undeclared, outside of functions [gcc]
15143412Snewton    or
15243412Snewton    >"sh.c", line ???: STR??? undefined [cc]
15343412Snewton
15443412Snewton    You interrupted make, while it was making the automatically
15543412Snewton    generated headers. Type 'make clean; make'
15643412Snewton
15743412Snewton14. On the cray, sometimes the CR/LF mapping gets screwed up.
15843412Snewton
15943412Snewton    You are probably logged in to the cray via telnet. Cray's
16043412Snewton    telnetd implements line mode selection the telnet client
16143412Snewton    you are using does not implement telnet line mode.
16243412Snewton    This cause the Cray's telnetd to try to use KLUDGELINEMODE.
16343412Snewton    You can turn off telnet line mode from the cray side by 
16443412Snewton    doing a "stty -extproc", or you can get the Cray AIC to build
16543412Snewton    a telnetd without KLUDGELINEMODE, or you can compile
16643412Snewton    a new telnet client (from the BSD net2 tape), or at least
16743412Snewton    on the suns use: 'mode character'.
16843412Snewton
16943412Snewton
17043412Snewton15. On AU/X, I made tcsh my startup shell, but the mac desktop is not
17143412Snewton    starting up (no X11 or Finder), and I only get console emulation.
17243412Snewton
17343412Snewton    This is another manifestation of item 5. Just add the pathname
17443412Snewton    to tcsh in /etc/shells and everything should work fine.
17543412Snewton
17643412Snewton16. On machines that use YP (NIS) tilde expansion might end up in /dev/null
17743412Snewton    If this happens complain to your vendor, to get a new version of NIS.
17843412Snewton    You can fix that in tcsh by defining YPBUGS in config.h
17943412Snewton
18043412Snewton17. Script on SGI 4.0.5 does not give us a tty, so we cannot have job
18143412Snewton    control. Their csh does not have job control either. Try:
18243412Snewton	% script
18343412Snewton	% cat > /dev/tty
18443412Snewton
18543412Snewton18. I start tcsh and it takes a couple of minutes to get the prompt.
18643412Snewton    You have defined REMOTEHOST and your DNS is not responding. Either
18743412Snewton    undefine REMOTEHOST and recompile or fix your DNS.
18843412Snewton
18943412Snewton19. If you need help generating your .cshrc file, check out:
19043412Snewton	http://www.imada.ou.dk/~blackie/dotfile/
19143412Snewton
19243412Snewton20. On POSIX systems the kernel will send hup signals to all the processes
19343412Snewton    in the foreground process group if 'stty hupcl' is set. For example
19443412Snewton    ./tcsh
19543412Snewton    echo $$
19643412Snewton    591
19743412Snewton    ./tcsh
19843412Snewton    kill -6 591
19943412Snewton
20043412Snewton    Will kill everything, since hup will be sent to all tcsh processes.
20143412Snewton    To avoid that you can set stty -hupcl, but it is not recommended.
20243412Snewton
20343412Snewton21. When I rsh the meta key stops working on the remote machine.
20443412Snewton
20543412Snewton    Try using rsh -8; this option is undocumented on some systems,
20643412Snewton    but it works. If that does not work, get and use ssh/sshd. You'll
20743412Snewton    be better off from a security point of view anyway.
20843412Snewton
20943412Snewton22. Tcsh compiled under hp/ux-10.x does not pass resource limits correctly
21043412Snewton    when ran on hp/ux-11.x systems. This is a problem with lack of ABI
21143412Snewton    compatibility between the two systems. The only solution is to recompile.
21243412Snewton
21343412Snewtonchristos
21443412Snewton
21543412SnewtonEverything else is a bug :-(
21643412Snewton