Merge from vendor branch LESS:
[dragonfly.git] / contrib / tcsh / FAQ
1
2                                   [Home] FAQ
3
4    Home | RecentChanges | Preferences
5      _________________________________________________________________
6
7    This is for people who do not read the manual!
8
9    So  far  people who don't read manuals don't read this either... I may
10    call  it README.*PLEASE* in the future, but then the same people won't
11    be able to get ftp it... :-)
12      _________________________________________________________________
13
14    1. Why is the meta key broken in tcsh-5.20 and up?
15
16    On  some  machines  the  tty is not set up to pass 8 bit characters by
17    default.  Tcsh 5.19 used to try to determine if pass8 should be set by
18    looking at the terminal's meta key. Unfortunately there is no good way
19    of  determining  if  the terminal can really pass 8 characters or not.
20    Consider  if  you  are  logged in through a modem line with 7 bits and
21    parity  and  your  terminal  has  a meta key. Then tcsh 5.19 would set
22    wrongly set pass8.
23
24    If  you  did like the previous behavior you can add in /etc/csh.login,
25    or in .login:
26
27     if ( $?tcsh && $?prompt ) then
28         if ( "`echotc meta`" == "yes" ) then
29              stty pass8
30         endif
31     endif
32
33    If you don't have pass8, maybe one of these would work..
34
35     stty -parity -evenp -oddp cs8 -istrip   (rs6000)
36     stty -parenb -istrip cs8
37
38    Finally,  tcsh  will  bind  all  printable meta characters to the self
39    insert  command.  If  you  don't  want  that  to  happen (i.e. use the
40    printable meta characters for commands) setenv NOREBIND.
41      _________________________________________________________________
42
43    2.  I  ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in
44    cbreak and no echo mode?
45
46    These  programs  are broken. Background jobs should not try to look at
47    the  tty.  What happens is that dbxtool looks in stderr to inherit the
48    tty  setups,  but  tcsh  sets up the tty in cbreak and -echo modes, so
49    that  it can do line editing. This cannot be fixed because tcsh cannot
50    give away the tty. Pick one of the following as a workaround:
51
52     dbxtool < /dev/null >& /dev/null &
53     /usr/etc/setsid dbxtool &
54
55    If that does not work, for dbxtool at least you can add "sh stty sane"
56    in your .dbxinit
57      _________________________________________________________________
58
59    3. I tried to compile tcsh and it cannot find <locale.h>?
60
61    Your  system  does  not support NLS. Undefine NLS in config_f.h and it
62    should work fine.
63      _________________________________________________________________
64
65    4. Where can I get csh sources?
66
67    Csh   sources   are   now   available   with   the  4.4BSD  networking
68    distributions. You don't need csh sources to compile tcsh-6.0x.
69      _________________________________________________________________
70
71    5. I just made tcsh my login shell, and I cannot ftp any more?
72
73    Newer  versions of the ftp daemon check for the validity of the user's
74    shell  before  they  allow  logins.  The list of valid login shells is
75    either  hardcoded or it is usually in a file called /etc/shells. If it
76    is  hard-coded, then you are out of luck and your best bet is to get a
77    newer  version of ftpd. Otherwise add tcsh to the list of shells. [For
78    AIX  this  file  is called /etc/security/login.cfg.] Remember that the
79    full  path  is  required.  If  there  is  no  /etc/shells, and you are
80    creating  one,  remember to add /bin/csh, /bin/sh, and any other valid
81    shells for your system, so that other people can ftp too :-)
82      _________________________________________________________________
83
84    6.  I  am using SunView? or OpenWindows? and editing is screwed up. In
85    particular  my  arrow  keys  and backspace don't work right. What am I
86    doing wrong?
87
88    Well,  cmdtool tries to do its own command line editing and the effect
89    you  get  is  one  of  using  an  editor inside an editor. Both try to
90    interpret  the arrow key sequences and cmdtool wins since it gets them
91    first. The solutions are in my order of preference:
92
93     1. Don't use suntools
94     2. Use shelltool instead of cmdtool.
95     3. Unset edit in tcsh.
96
97    6b. On a SPARCstation running Solaris 2.x and OpenWindows? 3.1, inside
98    a  cmdtool,  the  short-cut  key sequence to clear log (i.e. Meta-e or
99    Diamond-e) doesn't work: it just echos 'e' 
100
101    6c.  On  a  SPARCstation  running  Solaris  2.x  and OpenWindows? 3.1,
102    maketool  (within SPARCworks) doesn't work: it just does a `cd' to the
103    working directory then stops.
104
105    The  workaround  for  6b and 6c is doing "unset edit." Using shelltool
106    instead of cmdtool doesn't fix 6c.
107      _________________________________________________________________
108
109    7.  I rlogin to another machine, and then no matter what I tell 'stty'
110    I cannot get it to pass 8 bit characters?
111
112    Maybe  you  need  to  use  'rlogin  -8'  to  tell rlogin to pass 8 bit
113    characters.
114      _________________________________________________________________
115
116    8. Where do I get the public domain directory library?
117
118    Anonymous ftp to prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
119      _________________________________________________________________
120
121    9.  I  compiled  tcsh  using  gcc,  and when I start up it says: tcsh:
122    Warning  no  access  to tty (Invalid Argument). Thus no job control in
123    this shell
124
125    Your  <sys/ioctl.h>  file  is  not  ansi  compliant. You have one of 3
126    choices:
127
128     1. Run fixincludes from the gcc distribution.
129     2. Add -traditional to the gcc flags.
130     3. Compile with cc.
131      _________________________________________________________________
132
133    10.  I compiled tcsh with the SunOS? unbundled compiler and now things
134    get echo'ed twice.
135
136    It is a bug in the unbundled optimizer. Lower the optimization level.
137      _________________________________________________________________
138
139    11. How can I use the arrow keys with hpterm?
140
141    Hp terminals use the arrow keys internally. You can tell hpterm not to
142    do that, by sending it the termcap sequence smkx. Since this has to be
143    done  all  the  time,  the  easiest thing is to put it as an alias for
144    precmd, or inside the prompt:
145
146     if ($term == "hp") then
147         set prompt="%{`echotc smkx`%}$prompt"
148     endif
149
150    Note that by doing that you cannot use pgup and pgdn to scroll... Also
151    if you are using termcap, replace "smkx" with "ks"...
152      _________________________________________________________________
153
154    12.  On POSIX machines ^C and ^Z will do not work when tcsh is a login
155    shell?
156
157    Make sure that the interrupt character is set to ^C and suspend is set
158    to  ^Z;  'stty -a' will show you the current stty settings; 'stty intr
159    ^C susp ^Z' will set them to ^C and ^Z respectively.
160      _________________________________________________________________
161
162    13.  I  am trying to compile tcsh and I am getting compile errors that
163    look like:
164
165     >sh.c:???: `STR???' undeclared, outside of functions [gcc]
166     >"sh.c", line ???: STR??? undefined [cc]
167
168    You  interrupted make, while it was making the automatically generated
169    headers. Type 'make clean; make'
170      _________________________________________________________________
171
172    14. On the cray, sometimes the CR/LF mapping gets screwed up.
173
174    You  are  probably  logged  in  to the cray via telnet. Cray's telnetd
175    implements  line  mode  selection the telnet client you are using does
176    not  implement  telnet line mode. This cause the Cray's telnetd to try
177    to use KLUDGELINEMODE. You can turn off telnet line mode from the cray
178    side  by doing a "stty -extproc", or you can get the Cray AIC to build
179    a  telnetd  without  KLUDGELINEMODE,  or  you can compile a new telnet
180    client  (from  the  BSD net2 tape), or at least on the suns use: 'mode
181    character'.
182      _________________________________________________________________
183
184    15.  On AU/X, I made tcsh my startup shell, but the mac desktop is not
185    starting up (no X11 or Finder), and I only get console emulation.
186
187    This is another manifestation of item 5. Just add the pathname to tcsh
188    in /etc/shells and everything should work fine.
189      _________________________________________________________________
190
191    16.  On  machines  that  use  YP (NIS) tilde expansion might end up in
192    /dev/null
193
194    If  this happens complain to your vendor, to get a new version of NIS.
195    You can fix that in tcsh by defining YPBUGS in config.h
196      _________________________________________________________________
197
198    17.  Script on SGI 4.0.5 does not give us a tty, so we cannot have job
199    control.
200
201    Their csh does not have job control either. Try:
202
203         % script
204         % cat > /dev/tty
205      _________________________________________________________________
206
207    18. I start tcsh and it takes a couple of minutes to get the prompt.
208
209    You  have  defined  REMOTEHOST  and your DNS is not responding. Either
210    undefine REMOTEHOST and recompile or fix your DNS.
211      _________________________________________________________________
212
213    19. If you need help generating your .cshrc file, check out:
214
215         http://www.imada.ou.dk/~blackie/dotfile/
216      _________________________________________________________________
217
218    20.  On  POSIX  systems  the  kernel  will send hup signals to all the
219    processes in the foreground process group if 'stty hupcl' is set.
220
221    For example
222
223     ./tcsh
224     echo $$
225     591
226     ./tcsh
227     kill -6 591
228
229    Will kill everything, since hup will be sent to all tcsh processes. To
230    avoid that you can set stty -hupcl, but it is not recommended.
231      _________________________________________________________________
232
233    21. When I rsh the meta key stops working on the remote machine.
234
235    Try  using rsh -8; this option is undocumented on some systems, but it
236    works.  If  that does not work, get and use ssh/sshd. You'll be better
237    off from a security point of view anyway.
238      _________________________________________________________________
239
240    22.  Tcsh  compiled  under  hp/ux-10.x  does  not pass resource limits
241    correctly when ran on hp/ux-11.x systems.
242
243    This  is  a  problem  with  lack  of ABI compatibility between the two
244    systems. The only solution is to recompile.
245      _________________________________________________________________
246
247    23. Refreshing in command line editing can appear broken on some OS's
248
249    This  is  because  the  termcap/terminfo  description  lies  about the
250    ability  of  the  terminal  to  use tabs. At least on Compaq/DEC Alpha
251    OSF/1 3.x and 4.x systems, stty -tabs will cause problems.
252      _________________________________________________________________
253
254    Everything else is a bug :-(
255
256    Christos
257      _________________________________________________________________
258
259    Home | RecentChanges | Preferences
260    Edit text of this page | View other revisions
261    Last edited April 27, 2001 13:43 (diff)
262    Search: ____________________