File Name: CXTERM.FAQ (ftp.cs.purdue.edu: pub/ygz/) Last Update: Fri Jan 7 12:12:56 EST 1994 Author of this FAQ: Yongguang Zhang (ygz@cs.purdue.edu) CONTENTS: What do I to I need to use cxterm? What software is necessary? How to prepare for installation? How to make X11R4 cxterm? How to make X11R5 cxterm? How to install fonts in X11R4? How to install fonts in X11R5? How to install fonts in OpenWindows (Sun)? How to install fonts in DECwindow (DECstation)? How to make celvis? How to make cless? How to make hztty? How to run cxterm/celvis? How to read CND-CM articles? How to read/post alt.chinese.text using cxterm & hztty? Where to get help if I failed? More frequently asked questions (34 Q&A). =========================================================================== *************************************************************** * What hardware and system software do I need to use cxterm * *************************************************************** 1) You need to have access to a Unix workstation. Examples of such hardware are Sun, HP WorkStation, Apollo, DECstation (running Ultirx), IBM RT or RS (running AIX), SGI IRIS, Tektronix stations, Apple Macintosh. If you use a 386 or 486 PC, you need to run some sort of Unix operating system (SCO, Lunix, BSD386, or 386bsd, etc). If you don't have access to a Unix workstation, you at least need access to i) an Unix host, and ii) an X terminal or a 386/486 PC (that is connected to the host and supports TCP/IP). Examples of an X terminal include Visual X Terminal, NCD, etc. Your 386/486 PC must run some sort of X Window system or X Window emulator. 2) X Window System Version 11 (Release 4 or Release 5) must be installed in the workstation or the Unix host. Note that some other window systems are claimed to be X compatible. However, you need extra work to set up Chinese software in such systems. Here are some examples we know: Open Windows (for Sun workstation, etc.) DECwindow (for DECstations) 3) You need to ftp the source code of cxterm and some related software. You need to install them yourself. Many of the software are pretty easy to install. But after all, you may need a lot of knowledge of Unix/X to or help from your system manager to set up the software. Once set up, it is easy to use. *************************************** * What Chinese software is required * *************************************** Depends on what you want to do. 1) If you want to read Chinese file: You need: a) Chinese fonts for X11 b) cxterm c) cless Alternatives: i) ChiRK ii) Chinese fonts for X11 and xhzview iii) Chinese fonts for X11 and Mule 2) If you want to edit and write your own Chinese file as well You need: a) Chinese fonts for X11 b) cxterm c) celvis Alternatives: i) Chinese fonts for X11 and Mule 3) If you want to read CND-CM weekly Chinese news magazine. You need: Same as 1) 4) If you want to join the news group alt.chinese.text. You need: a) Chinese fonts for X11 b) cxterm c) hztty Alternatives: i) Chinese fonts for X11 and Mule ii) ChiRK (read only, cannot post) iii) Chinese fonts for X11 and xhzview (ditto) 5) If you want to join the news group alt.chinese.text.big5. You need: Same as 2) 6) If you want to use Chinese for other purpose, like gopher, irc, etc. A good collections of software for you convenience are: a) Chinese fonts for X11 b) cxterm c) cless d) celvis e) hztty ********************************** * Getting the Chinese software * ********************************** If you have Internet access, use anonymous ftp. Remember to set the binary mode before getting them. 1) Chinese fonts for X11 ftp.cs.purdue.edu: pub/ygz/x-fonts/* ifcss.org: software/x-win/xfonts/* 2) cxterm for X11R4 (or OpenWindow, DECwindow, etc): ftp.cs.purdue.edu: pub/ygz/cxterm-11.4.2.tar.Z for X11R5: ftp.cs.purdue.edu: pub/ygz/cxterm-11.5.1.tar.Z pub/ygz/cxterm-11.5.1.patch01 ifcss.org: software/x-win/cxterm-11.5.1.tar.Z software/x-win/cxterm-11.5.1.patch01 3) cless ftp.cs.purdue.edu: pub/ygz/utils/cless.tar.Z ifcss.org: software/x-win/chinese-utils/cless.tar.Z 4) celvis ftp.cs.purdue.edu: pub/ygz/celvis.tar.Z ifcss.org: software/x-win/editor/celvis.tar.Z 5) hztty ftp.cs.purdue.edu: pub/ygz/zW-hz/hztty-1.0.tar.Z If you don't have Internet access, you may send e-mail to c-xterm@cs.purdue.edu, we may arrange them to sent to you. Or write to Yongguang Zhang Dept. of Computer Sciences PURDUE UNIVERSITY West Lafayette, IN 47907 U.S.A. ******************************** * Preparing for installation * ******************************** You need a few MB free disk space to hold the software and build them. Move your files into a directory where you can work on it. Make some dedicated directories (for management purpose): one to put executable binaries, recommended: ~/bin one to put fonts, recommended: ~/xfonts one to put dictionaries, recommended: ~/dicts (where ~/ means your home directory). Put the directory ~/bin in your shell path, if you haven't done so before. For example, in .cshrc (for csh): set path = ( . ~/bin $path ) in .profile (for sh or ksh): PATH=$HOME/bin:$PATH ************************************************** * Making X11R4 cxterm from cxterm-11.4.2.tar.Z * ************************************************** 0) Prerequisites: You are using MIT X11 Release 4. 1) Unpack the source code archive: % zcat cxterm-11.4.2.tar.Z | tar xvf - % cd cxterm 2) If you system has xmkmf (one of X11 utilities) installed properly, % xmkmf % make Makefiles % make % mv cxterm cxresize tit2cit cit2tit ~/bin % mv Dict/*.cit ~/dicts If you don't have xmkmf, try to edit the ./noimake.def yourself to have all the site-dependent correctly set for you. Consult your system manager for the configuration of your system. Then % vi ./noimake.def # change the configuration % make -f Makefile.noimake % make -f Makefile.noimake install # copy files to your home dirs. You'd better have your system manager install xmkmf, especially for those who have a very unsimilar OS platform. 3) After successful installation, put the definitions in ./CXterm.xd into your account's X window resource file. The normal place is in the file ~/.Xdefaults (or sometimes, ~/.Xresources): % cat ./CXterm.xd >> ~/.Xdefaults If you use "xrdb" to manager the resource, remember to reload it: % xrdb -load ~/.Xdefaults Before invoking cxterm, the environment variable HZINPUTDIR should be set to the directory name contains all compiled cxterm dictionaries you just installed. Assume you have put them in ~/dicts, add the following to your ~/.cshrc file (for csh or tcsh): setenv HZINPUTDIR ~/dicts or the following to your $HOME/.profile file (for sh or ksh): HZINPUTDIR=$HOME/dicts; export HZINPUTDIR "Source" it after you make the changes. **** SPECIAL NOTICES FOR "DECstation" **** Before you do the make, change line 854 in main.c from fileno(stderr) = i; to (stderr)->_file = i; Then follow the above steps. ************************************************** * Making X11R5 cxterm from cxterm-11.5.1.tar.Z * ************************************************** 0) Prerequisites: You are using MIT X11 Release 5. 1) Unpack the source code archive: % zcat cxterm-11.5.1.tar.Z | tar xvf - % cd cxterm 2) If your system has xmkmf installed, simply type % make If you don't have xmkmf, try to edit the ./noimake.def yourself to have all the site-dependent correctly set for you. Consult your system manager for the configuration of your system. % vi ./noimake.def # change the configuration % make -f Makefile.noimake 3) Edit ./noimake.def to set up the destination directories. Then install: % make -f Makefile.noimake install Or, simply copy the files yourself: % mv cxterm/cxterm/cxterm ~/bin % mv cxterm/cxterm/hzimpath ~/bin % mv cxterm/cxterm/tit2cit ~/bin % mv cxterm/cxterm/cit2tit ~/bin % mv cxterm/dict/tit/*.cit ~/dict 4) After successful installation, put the definitions in ./cxterm/CXterm.ad into your account's X window resource file. The normal place is in the file ~/.Xdefaults (or sometime, ~/.Xresources): % cat ./cxterm/CXterm.ad >> ~/.Xdefaults Before invoking cxterm, the environment variable HZINPUTDIR should be set to the directory name contains all compiled cxterm dictionaries you just installed. Assume you have put them in ~/dicts, add the following to your ~/.cshrc file (for csh or tcsh): setenv HZINPUTDIR ~/dicts or the following to your $HOME/.profile file (for sh or ksh): HZINPUTDIR=$HOME/dicts; export HZINPUTDIR "source" it after you make the changes. *************************************** * Installing Chinese fonts in X11R4 * *************************************** Move all the font files and "fonts.alias" into one dedicated directory, (e.g. ~/xfonts) and do the following installation steps: % cd ~/xfonts % bdftosnf -t 8x18.bdf > 8x18.snf % zcat cclib16fs.bdf.Z | bdftosnf -t > cclib16fs.snf % zcat cclib16st.bdf.Z | bdftosnf -t > cclib16st.snf % zcat hku-ch16.bdf.Z | bdftosnf -t > hku-ch16.snf % mkfontdir . After you install all these fonts, you need to inform your X window system server by: % xset fp+ ~/xfonts You can put the above line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. *************************************** * Installing Chinese fonts in X11R5 * *************************************** Move all the font files and "fonts.alias" into one dedicated directory, (e.g. ~/xfonts) and do the following installation steps: % cd ~/xfonts % zcat cclib16fs.bdf.Z | bdftopcf -t > cclib16fs.pcf % zcat cclib16st.bdf.Z | bdftopcf -t > cclib16st.pcf % zcat hku-ch16.bdf.Z | bdftopcf -t > hku-ch16.pcf % mkfontdir . After you install all these fonts, you need to inform your X window system server by: % xset fp+ ~/xfonts You can put the above line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. Note: the installation of 8x18 font in X11R5 is optional. By default X11R5 cxterm uses 8x16 (in standard MIT X11). ************************************************* * Installing Chinese fonts in Sun OpenWindows * ************************************************* If you are running X11/NeWS window system server ("xnews") in a Sun workstation, do the following. Move all the font files into one dedicated directory, (e.g. ~/xfonts) and do the following installation steps: % cd ~/xfonts % uncompress *.bdf.Z % convertfont 8x18.bdf % convertfont -M -n cclib16fs -o cclib16fs cclib16fs.bdf % convertfont -M -n cclib16st -o cclib16st cclib16st.bdf % convertfont -M -n hku-ch16 -o hku-ch16 hku-ch16.bdf % bldfamily (Note: ignore the error messages by "bldfamily", them won't harm.) Then inform your X11/NeWS window system by: % xset fp+ ~/xfonts You can put the above line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. ****************************************************** * Installing Chinese fonts in DECstation DECwindow * ****************************************************** X windows running in DECstations are often the DECwindows. Move all the font files and "fonts.alias" into one dedicated directory, (e.g. ~/xfonts) and do the following installation steps: % cd ~/xfonts % dxfc -t < 8x18.bdf > 8x18.pcf % zcat cclib16fs.bdf.Z | dxfc -t > cclib16fs.pcf % zcat cclib16st.bdf.Z | dxfc -t > cclib16st.pcf % zcat hku-ch16.bdf.Z | dxfc -t > hku-ch16.pcf % dxmkfontdir . Then inform your DECwindow system by: % xset fp+ ~/xfonts You can put the above line in your X startup script, (e.g. ~/.xinitrc), so that each time you restart X window system, the path is added. ************************************* * Making celvis from celvis.tar.Z * ************************************* % zcat celvis.tar.Z | tar xvf - % cd celvis If your operating system is derived from BSD Unix (e.g. SunOS, Ultrix), simply type % make % mv celvis ~/bin If your operating system is a BSD derivative, e.g. system V Unix, try other Makefile (Makefile.???) which fits your OS type. You will need to do minor revision of that Makefile. *********************************** * Making cless from cless.tar.Z * *********************************** % zcat cless.tar.Z | tar xvf - % cd cless % sh ./install % make % mv cless ~/bin If success, the executable cless program is produced. *************************************** * Making hztty from hztty-1.?.tar.Z * *************************************** % zcat hztty-1.?.tar.Z | tar xvf - % cd hztty % make Choice one of the you use from the list. % make % mv hztty ~/bin If success, the executable hztty program is produced. ******************************** * How to run cxterm & celvis * ******************************** Set the PATH to include the name of the directory (e.g. ~/bin) where you put the executable binaries. Then, % cxterm & will start a Chinese X terminal for you, if you want to specify fonts, try: % cxterm -fh cclib16fs -fn 8x16 & If you want to use BIG5 cxterm, try: % cxterm -fh hku-ch16 -fn 8x16 -BIG5 You can also add other standard xterm options as well, such as "-sb" (add scrollbar), "-rv" (get reverse video). On the cxterm window, issue celvis command you get the Chinese editor. Try any Chinese text file to see how cxterm and celvis work : % celvis README-DIR.gb (GB coding) or % celvis README-DIR.b5 (BIG5 coding) ********************************* * How to read CND-CM articles * ********************************* Decode your Chinese articles received by e-mail. Save your mail as a text file (say, "Chinese.uue"). Then do uudecode as: % uudecode Chinese.uue Then a decoded Chinese file (with name "cm9104c.gb" or alike) is produced. That is the Chinese articles in GB coding. Start cxterm: % cxterm & Read Chinese article in the cxterm window, using cless, or celvis: % cless cm9104c.gb or % celvis cm9104c.gb ************************************************************ * How to read/post alt.chinese.text using cxterm & hztty * ************************************************************ Start cxterm: % cxterm In the cxterm window, run your favor news reader program with hztty. For example, if your news reader is "rn": % hztty rn You cannot use X Window based news readers like xrn with hztty. If you use Big5 cxterm to read alt.chinese.text, in the cxterm window run the following instead: % hztty -O hz2gb:gb2big -I big2gb:gb2hz rn ****************************************** * Where to get help if it doesn't work * ****************************************** To successfully install a software in Unix and X window is not an easy task, especially if you are using a not-so-popular platform. However, there are some places you can get help from. 1) Read the "Frequently Asked Questions" part to see if there are some similar situations and solutions which are not mentioned above. Then try them out yourself. 2) Ask around to see if someone has already installed a copy in your department. If you are in a big university, mostly like someone already used these software for quite some time. 3) See your system manager or find a system guru in your department to look at the problems with you. In most cases, the failures in installation are not related to the Chinese software itself. These errors are due to the unpredictable software configuration in your site, and they can be easily overcome if you know your systems well. So a knowledgeable-looking person near you will be more helpful than a person who never uses your computer. 4) Send mail to the experts who are willing to help. Be sure to include some detail description of your system, including machine model, OS version, X Window version, display type, etc. However, Unix and X11 are such configurable systems that most of the problems you come cross depend on the system configuration. Usually the remote experts can only provide some useful hints based on their experiences. 5) There are also hints in ftp.cs.purdue.edu: pub/ygz/cxterm-platforms/ for some machines on which cxterm has been install successful. ftp.cs.purdue.edu: pub/ygz/CXTERM-FONTS.readme also has some hints on installing X fonts. ******************************** * Frequently asked questions * ******************************** GENERAL QUESTIONS ^^^^^^^^^^^^^^^^^ ABOUT X WINDOWS ^^^^^^^^^^^^^^^ Q: How to install the Chinese fonts in a X terminal? A: Fonts are hard to add to X terminal since X terminal doesn't have its own disk. Different model of X terminal will have different solution. Many X terminals are set up to load the fonts by reading the font files via NFS. In this case your font directory must be put in a file system which is exported to the X terminals. Others may use font daemons. So the best way to do this is to give the *.bdf font files to your system manager and ask him/her to install them for you. -------------------- Q: I have access to more than one workstations, do I need to install a copy of Chinese fonts in each of them? A: It depends. First, each workstation running X window system must be able to read the font files directly (e.g. by NFS). Second, the .snf files generated during the installation are architecture dependent. For example, if you have a network of Sun, DEC, and HP workstations, which share some file systems, you can install one copy for Sun, one copy for DEC, and one copy for HP. All workstations of the same architecture can share a same copy via NFS. There is exception in X11R5. X11R5 .pcf files are machine independent. One copy of the .pcf fonts can be used by all workstations, no matter what architecture that copy of fonts were installed. -------------------- Q: I failed in install the fonts, what's wrong? A: Here is how to test your font installation: 1) run % xset q You will see a list of directories under "Font Path:" section. The path-name of your new-added font directory, should appear on the list exactly once. If you cannot find your new-added font directory in the list, your installation failed. It may be caused by: a) you didn't follow the steps to build the font directory (e.g. you forgot to "mkfontdir"); b) you didn't give a *full* path name (the path name which starts from the root as "/....") for "fontdir" in "xset fp+ fontdir"; c) the X server doesn't have the privilege to read your font directory (e.g. X server is not started by you and your directory is protected); d) there are too many directories in the "Font Path:" list (remove some unimportant ones to make rooms for this new one); or e) your font directory is actually in another machine, but that directory is not mounted on the workstation where the X server runs. (In this case, try to put the font files in your workstation. If that is not possible, e.g. in a diskless workstation, or X terminal, ask your system manager for help.) If your font directory appears twice or more. Run % xset fp % xset fp+ your_font_directory and redo the testing again. 2) run % xset fp rehash % xlsfonts The output of the second command is a list of font names. The string "cclib16st" should appear in the list exactly once. If you cannot find "cclib16st", but you can find something like -cclib-..., you forgot to put "fonts.alias" in your font directory. If you cannot find anything about cclib16st, or -cclib- font, you failed to convert the .bdf fonts into the proper format. 3) run % xfd -fn cclib16st -start 41216 You should be able to see all the Chinese characters page by page. (All "real" Hanzi starts from the 16th page.) -------------------- Q: When I typed the "xset +fp ....." command, it failed with a BadValue error and something like major opcode 51 (X_SetFontPath). A: It means the X server cannot find or read your font directory, or that your directory does not look like a font directory to the server. Is the font directory you're specifying readable from the SERVER's file system? Remember, it's the server, not the client, which interprets your font directory. Trouble in this area is especially likely when you issue an xset command with shell metacharacters in it (e.g. "xset +fp ~/fonts") and the server is an X terminal or managed by xdm. Is the directory really a font directory? If you're running an MIT server (or most varieties of vendor servers), look in the directory for the file "fonts.dir". (See the previous question and answer.) [This Q&A is taken from X11 FAQ] -------------------- Q: The fonts are quite large. Is it possible to make them smaller? A: In X11R4, yes. First, all the *.bdf or *.bdf.Z can be removed after the *.snf files are converted and the font path is installed. Second, if you want to trade time for space, you can compress all the *.snf files: % compress *.snf % mkfontdir . % set fp rehash This will save you a lot of space, but you have to wait longer for cxterm to start up. However, in X11R5, or some non-native X11R4 window systems like Open Windows, you cannot compress the font files. -------------------- Q: May I run cxterm in one machine but display window in another workstation (i.e. another machine)? A: Yes, X is a network-transparent window system. Try the following: MachineA% cxterm -display WorkstationB:0.0 One thing you have to keep in mind is that X11 fonts are associated with X server (each workstation will run its own X server), not cxterm. Therefore the Chinese fonts must be locally installed and accessible in the workstation on which your cxterm window is going to display. ABOUT CXTERM / CELVIS ^^^^^^^^^^^^^^^^^^^^^ Q: How to install cxterm if I don't find "xmkmf" in my system? A: Read README file in the cxterm directory. Try to follow the instruction. And ask your system manager and local X guru for help. -------------------- Q: When I compile X11R4 cxterm in DECstation, I get an error in main.c, line 854. A: Change line 854 in main.c from fileno(stderr) = i; to (stderr)->_file = i; and try the make again. -------------------- Q: When I compile X11R5 cxterm, I get an error in main.c: "....../X11/Xlib.h", line 61: illegal type combination A: If you use Makefile.noimake, I would suggest you try to use Imakefile. Please check the cxterm installation instructions. Or, you may delete -DNOSTDHDRS from noimake.def and try again. -------------------- Q: I have trouble in Tekproc.c, line 1191, 1344, 1427. A: Change line 77 from #define DefaultGCID DefaultGC(screen->display, DefaultScreen(screen->display))->gid to #define DefaultGCID XGContextFromGC(DefaultGC(screen->display, DefaultScreen(screen->display))) and try the make again. -------------------- Q: I still cannot compile cxterm in DECstation, or SGI, or XXX platform. There are many error messages produced. A: There is a directory of files contains some hints on compiling cxterm in various workstations and platforms (DECstation, SGI IRIS, HP, etc.) They are in ftp.cs.purdue.edu (128.10.2.1): pub/ygz/cxterm-platforms. Get the corresponding files by ftp and study them before installing cxterm. -------------------- Q: I cannot compile cxterm 11.4.2 under OpenWindows 2.0. A: Although OpenWindows 2.0 is claimed to be X11R4 compatible, it doesn't have all the libraries that come with the MIT X11R4 distribution, which are required to compile cxterm. However, once you compiled cxterm against X11R4 libraries, the executable code cxterm can be run under OpenWindows. Or, you can try OpenWindows 3.0. It has all the prerequisite files. -------------------- Q: When I make cxterm in Sun, the error message is: ld: Undefined symbol _sin _cos .... _get_wmShellWidgetClass _get_applicationShellWidgetClass A: There must be some problem with your system's X11 libraries. (Seems to be a bug in SunOS.) You may try the following: 1) modify "Makefile" to add a library "-lm" when linking cxterm. 2) modify "Makefile" to change "-lXmu" into .../libXmu.a, i.e., to replace the shared library with the non-shared one. If these still don't work, change all shared libraries to the non-shared ones (or simply add "-Bstatic" option to Sun cc, or "-static" to gcc). -------------------- Q: When I make cxterm 11.5.1, the error message is: ...... make: Fatal error in reader: Makefile, line 226: Extra `:', `::', or `:=' on dependency line ...... A: It seems you were trying to install cxterm 11.5.1 in X11R4 (or X11R4- derived, e.g. OpenWin 3.0). It won't work. Try cxterm 11.4.2 instead. -------------------- Q: When I type "cxterm", it prints error messages "permission denied" or "cannot execute". A: You may mis-treat the name of the directory as the executable binaries. Double check to make sure what is the path-name of the cxterm executable. -------------------- Q: When I start cxterm, it prints error messages "cxterm: unable to open font ...". A: This may be caused by improper installation of X11 font. See the answer of the question "I failed in install the fonts, what's wrong?" -------------------- Q: When I start X11R5 cxterm (11.5.1), it prints error messages "cxterm: unable to locate a suitable font". A: This may be a font installation problem, see the previous question. Or, your X window don't have "8x16" font. (For example, in DECstation.) You can specify an alternative font explicitly as: % cxterm -fn '-sony-fixed-medium-r-normal--16-120-*-*-*-*-iso8859-1' or % cxterm -fn 8x18 or % cxterm -fn fixed (the last resort) You may simply edit your ~/.Xdefaults file to replace the string "8x16" by the name of the alternative font. For example: cxterm*font: -sony-fixed-medium-r-normal--16-120-*-*-*-*-iso8859-1 -------------------- Q: When I start cxterm, several pieces of warning messages emerge: Widget class ... version mismatch ... A: These warning messages are not important. You can just ignore them. Probably the version of X window you use to compile cxterm is not the version you run cxterm on. E.g, compiling cxterm in X11R4 but run it on X11R3, or compiling cxterm in MIT X11, but run it on OpenWindows. Anyway, these messages won't harm cxterm. -------------------- Q: I cannot switch the input methods, only F1 and F2 keys work. A: If you want to use Chinese input method, you should remember to set up the environment before starting cxterm. First, the resource definitions contained in CXterm.ad (or CXterm.xd) file should be appended to your X window resource file (e.g. ~/.Xdefaults), as: cat CXterm.ad >> ~/.Xdefaults Here is a way to identify your X window resource file: 1) if in your X window startup script (e.g. ~/.xinitrc), there is a line like "xrdb -load filename", then the "filename" is the resource file; (remember to rerun "xrdb -load filename" after the change) 2) if the environment variable XENVIORNMENT is set, the one XENVIORNMENT points to is the resource file; 3) finally, try ~/.Xdefaults; (Sometimes it could be ~/.Xdefaults.???, or ~/.Xresources, etc. Consult your local X guru.) 4) if none of above works for you, simply try "xrdb -merge CXterm.ad". Second, the environment variable HZINPUTDIR should be set to the directory name containing all compiled cxterm dictionaries (*.cit files). E.g. setenv HZINPUTDIR ~/dicts And remember to start a new cxterm in the same window you just typed the above setenv command. Then input should works in the new cxterm window. -------------------- Q: When I try to switch the input methods by pressing F3, it beeps and nothing happens. A: You have not set up the resource CXterm.ad yet. See the previous Q&A. -------------------- Q: When I try to switch the input methods by pressing F3, it says unable to load input table for XXXX A: You have set up the resource CXterm.ad successfully, however, the HZINPUTDIR environment variable is not set. Either you forgot to set the environment variable before you starts cxterm, or the the directory of $HZINPUTDIR doesn't have a file called XXXX.cit -------------------- Q: I can switch input method by pressing F2, ..., F8, but then I can not go back to ASCII by press F1. A: In some systems has been is reserved for system use. (For example, in DECstation is "Hold Screen", and in OpenWindows or Motif it is often the "Help" key.) In such an environment you can be trapped into other input modes and never be able to come back to the normal ASCII mode again. You can correct this problem by carefully editing the cxterm resource definition that you have appended to ~/.Xdefaults. You should choose unused function keys as the input mode switching keys. (For example, you may choose to switch to ASCII.) -------------------- Q: When I move cursor in cxterm (e.g., in celvis), cxterm sometimes doesn't display the chinese characters correctly, especially when moving the cursor from ASCII characters to Chinese characters or vise versa. Ctrl-R can redraw the screen correctly though. A: Probably you are not using a match ASCII font for the Chinese font. The ASCII font should be exactly half as wide as the the Chinese font. For 16x16 Chinese fonts such as "cclib16st" and "hku-ch16", "8x16" or "8x18" font should be used. You can specify the fonts in cxterm command line, e.g. cxterm -fh cclib16st -fn 8x16 -------------------- Q: Can I input a phrase in cxterm? A: In this version of cxterm, you cannot. You may try MEPY cxterm, which provides a better input extension for cxterm. The next version of cxterm, which is still under development, will support phrase input as well as many other input features. -------------------- Q: When I ran celvis, the prompt was: Can't read /etc/termcap A: Your Unix system may be a SYS V deriver (ask your system manager to confirm this), and you may have a /etc/terminfo instead of /etc/termcap. Use Makefile.s5 as the Makefile. If it still doesn't work, change the line in Makefile.s5 LIBS= -ltermcap into LIBS= -lterminfo or LIBS= -ltermlib and try again. -------------------- Q: I cannot compile celvis in System V Unix (such as SGI IRIX), it complains a lot like: accom: Error: curses.c, line 269: prototype parameter 2 type must have all of the actual arguments qualifiers (except the outermost) and pointed-to types must be compatible (ANSI 3.3.2.2,3.3.16.1) signal(2 , trapint); A: edit curses.c, replace the line 269: signal(SIGINT, trapint); with signal(SIGINT, (void(*)()) trapint); and replace line 388: signal(SIGWINCH, getsize); with signal(SIGWINCH, (void(*)()) getsize); Then try again. -------------------- Q: I cannot input or output Chinese in the shell prompt -- what I got is two random ASCII characters instead of a Chinese character. A: Maybe the 8th bits are stripped from the Chinese characters. Cxterm tries to set the proper tty for you, but the user or the system may later mistakenly reset it. Some shell (e.g. tcsh) strips the 8th bit. In tcsh, hi-bit set characters are used for special key bindings. To correct this, type "setenv LANG". Csh, sh, ksh usually don't have this problem. Some system (or your shell startup file, e.g. .cshrc or .login) set the tty to strip the 8th bit. You can reset it by typing "stty pass8". (Different systems may have different stty format. Read stty(1) manual for help. Some possible stty options are "pass8", "cs8", "-istrip", "-parenb", etc.) Check your X resource file. If you find something like "eightBitOutput", set it to be "true" or "on". (Or simply remove it, the default is "on".) Some operating system may strip the 8th bit from every character. You are out of luck since such system is not for international use. -------------------- Q: I cannot input Chinese in celvis; it sometimes results in a beep. A: In celvis, you should be aware of the two vi modes, "input" mode (in which you insert English text), and the "edit" mode (in which you move the cursor). Chinese input is only accepted in "input" mode. Trying to enter Chinese characters in "command" mode will result in a beep. Also check the above question and answer. -------------------- Q: In celvis, the text seems to have been truncated at the right for each line. Even extending the window width won't help. A: The lines that are longer then the window width are not truncated. They are side-scrolled by celvis. To see the rest of the line, you need to move the cursor towards the right edge of the window until the hidden text is revealed. It is the feature (or bug, sometimes people look this way) of celvis that it side-scrolls instead of wraps a line. -------------------- Q: Where can I get more input methods for cxterm? A: Ftp directory ftp.cs.purdue.edu: pub/ygz/cxterm-dictionary have some external input methods for cxterm, and there will be more in the future, if we can find any. We also welcome you to contribute new input methods. See cxterm-dictionary/00DICTIONARY.readme. Here is how to install them: 1) ftp it in *binary* mode. 2) convert it to .cit format by tit2cit: % tit2cit FOO.tit > FOO.cit 3) put it in the directory with other .cit files you already have, e.g: % cp FOO.cit ~/dicts 4) modify your "~/.Xdefaults" to add new input method FOO. For example, if you wish to use as the switch key to FOO. Add the following line to ~/.Xdefaults. (If is already defined to be other input method, you must remove that definition line in ~/.Xdefaults first.) F9: switch-HZ-mode(FOO). If you wish to use Shift F9, use the following instead: Shift F9: switch-HZ-mode(FOO). 5) restart cxterm. MISCELLANEOUS ^^^^^^^^^^^^^ Q: How to print the Chinese article that I displayed in X window? A: You may dump the Chinese window to a Postscript printer. Use X11 utilities xdpr % xdpr -device ps -Pprinter_name and click the mouse in the desired window (where ps is for Postscript printer. Manual xdpr(1) describes options for other kinds of printers. However, there are quite a few packages that let you convert a Chinese text file into a Postscript file. Both "HZ2PS" and "GB2PS" are good packages to print plain Chinese text. "GB2PS" can also do some page formatting. Other software packages including ChTeX and pmTeX will be useful if you want to text formatting and typesetting capability. HZ2PS, GB2PS, together with some other Chinese text to postscript tools can be found in ifcss.org (129.107.1.155): ~ftp/software/unix/print/ ChTeX is available at crl.nmsu.edu (128.123.1.18): ~ftp/pub/chinese/. pmTeX is available at ftp.math.psu.edu (146.186.131.129): ~ftp/pub/simpson/chinese/ (look into pmc/ or the file pmc.tar.Z). -------------------- Q: When I use "more" to read Chinese article in cxterm, the Chinese characters are messed up from time to time. A: Try to use "cless" instead. "more" is not designed for Chinese. -------------------- Q: Why cannot I read alt.chinese.text.big5 in cxterm? A: First, by default the cxterm uses GB encoding, not the Big5 encoding as used in alt.chinese.text.big5. To use cxterm with Big5, you need to open cxterm this way: cxterm -fh hku-ch16 -fn 8x16 -BIG5 & Second, read the Q&A of "I cannot input or output Chinese in the shell prompt -- what I got is two random ASCII characters instead of a Chinese character." Third, the news feeding path in your system may not be 8-bit clear, If the news articles in the news spool of your system are already stripped of the 8th bits (many systems do so), you are out of luck and generally there is no way for you to read the articles. (An alternative way is to read newsgroup alt.chinese.text instead, which has the same content but use HZ encoding to bypass the 8th-bit problem. However you need hztty as well. After open a Big5 cxterm, type: hztty -O hz2gb:gb2big -I big2gb:gb2hz the-news-reader-of-your-choice Fourth, your news reader may not be compatible with Big5 Chinese. Try some other newsreader, such as "tin". -------------------- Q: Did cxterm, celvis, hztty, etc. come from some project? A: No. The author(s) wrote them in their spare time.