LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   contemplations on Linux and Chinese wordprocessing (https://www.linuxquestions.org/questions/linux-newbie-8/contemplations-on-linux-and-chinese-wordprocessing-124369/)

fiets 12-09-2003 06:16 PM

contemplations on Linux and Chinese wordprocessing
 
I've been reading lots of stuff for the last few weeks to find out how I might be able to use Linux to read and write Chinese. I've installed and played around with a red hat and a knoppix distribution, finding the latter much easier to maintain and install, at least in the basic installation but I did not get much beyond that sofar.

My basic requirements of a Linux distribution would not go much more beyond the mere fact that I would like to be able to read (which I can in a browser) and write Chinese (which I can't) within an English or other western desktop environment. Not being a programmer, I do not see why I would require different editors to be able to process Chinese, nor am I a gamer, so I do not need any emulators to be able to process Chinese.
Maybe I misunderstand the concept of Linux but I would only like to be able to write Chinese in OO Office in an email program and in a browser (comparable to writing Chinese with e.g. twinbridge or mview in windows).

The Chinese Howto (which seems outdated to me but being still ignorant on the subject I may be wrong) does not give answers to basic questions that arise from deep within me:

A
even if I manage to install everything as described in the Chinese Howto, how would I be able to input Chinese, how would it work? Do I get a virtual keyboard that supplies me with possibilities to write pinyin and then have a selection of Chinese characters as in Twinbridge and the like? I do not really see how this can be performed by only loading Chinese fonts.
Why would I need Xcin or Latex to write Chinese in OO Office, in a browser or email program?

B
Eventually, after hopefully having received some answers on my questions in A, I would like to know if there are any particular "Western" distributions that are "better suited" to be able to write Chinese in applications as described above. In particular: does anybody have any experiences with knoppix 3.2 and Chinese?

C
Suppose I install a Chinese distribution: does Red Flag 4.0 (Chinese version) provide the possibility to "localise" in a western environment, that is, I run it as an English or Dutch environment and just use the Chinese functions to read and write Chinese?

I would be grateful for any comments, remarks and answers before I drown my self into the sea of Linux....

wapcaplet 12-09-2003 07:12 PM

I do not have any answers for you, but I just coincidentally noticed a review of StarOffice 7 which mentions that Asian language support is one of the new features.

JDW 12-09-2003 08:29 PM

contemplations on Linux and Chinese wordprocessing
 
Hi Fiets,

There are many threads/posts that will solve these questions for you, just type "chinese input" or something similar e.g. "xcin", "chinput", "fcitx", "chinese locale" etc.) in the search field of the forum page of this website (which is a great site for newish Linux users!), and spend some time reading through what other people have found out about this topic.

Basically, though, I use Mandrake 9.2 (but have also installed Redhat 9) with an English environment and I have pretty much full functionality using Chinese input methods such as Chinput and fcitx. xcin is superb for Traditional Chinese input as well. xcin and chinput will usually be included with any major distro, fcitx can be found on the Net (www.fcitx.org).

The fundamental way this works in Linux is that in order to read & type in Chinese characters, you need to create a separate Chinese user (e.g. "simpuser") which will have its own home directory at /home/simpuser. You add the following lines to the .bashrc file in this directory IN ORDER TO CONVERT THIS USER TO CHINESE LOCALE SETTING:

export LANG=zh_CN // or zh_TW.Big5 for traditional locale
export LC_ALL=zh_CN
export LC_CTYPE=zh_CN
export XMODIFIERS=@im=chinput // or xcin or fcitx or scim etc.

after logging in to this new user, type locale at the command line and it will indicate that these changes have been implemented.


Remembering that Linux (and Unix!!) is a true multi-user system, so while I am logged in as my main English user-name, I can log into my Chinese user at the same time (I log in through the command line in Konsole), and any application that is started from this separate user environment will have the locale set to Chinese. To start an app :

simpuser@localhost$ chinput & oowriter // this will start the chinput input server and then start up Open Office Writer, which should have Chinese menus etc. Type CTRL+SPACE and the input window should be there.

I have tested chinput & fcitx with lots of apps, I would mostly use oowriter & kmail, but I have got this working fine with Evolution, Mozill Mail, Kword etc.

Good tip : for pinyin input, fcitx is pretty cool and seems to work with every application that I have tried it with, including oodraw. also, if you need an xterm-like app with Chinese capability, download cxterm...it is very easy to use...

You said that the Chinese how-to is out of date - couldn't agree more! i am only a simple user and not a developer, but I think a few of us could get together and write an up-to-date How-To for Chinese from an end- user's perspective, that would take into account quirks and differences between distros etc. Just a thought...

cheers,

jdw

fiets 12-10-2003 06:02 PM

Howdy JDW,

We're getting somewhere, thanks to you. Not that I'm quite sure where this will all lead to but I wet my feet already so I guess there's no turning back.

What I was really looking for was some kind of an answer as to how the system functions compared to twinbridge and the like in windows. I found some pics which make me feel more comfortable as I recognise the stuff ;-). I still do not see yet why I wld need all kinds of editors like xcin and xcitx but I'll worry about that later.

As my Knoppix distribution does not have any Chinese fonts by default, I guess I'll have to start to download some fonts. And even as I'll add a user for Chinese usage, I'll install the fonts as root as I might add more than one user to write Chinese eventually.

As for the xcin and xcitx: assuming they were not included in the mandrake distro you use either: did you install them at root level or at user level?

This will do for the time being, I guess I'll be busy with this for a while.

I would not mind participating in making a new how to (for newbies) eventually but I suppose I would need an expert to comment on anything I write eventually as I still do not really know what I'm talking about here, if you know what I mean.....

JDW 12-10-2003 06:34 PM

contemplations on Linux and Chinese wordprocessing
 
Hi,

xcin, chinput and fcitx are not actually editors, they are XIM input servers that allow you to in multi-byte characters such as simplified & traditional Chinese.

I had a look at the Gentoo Chinese Localisation guide, that is a pretty darn good how-to! The only thing is that some of the commands given may be Gentoo-specific (?), rather than being usable for other distros. Thanks for that though...

JDW

Maurice Arthur 12-26-2003 01:12 AM

Have down loaded fcitx but tar zxvf fcitx -1.8.5 .tar.gz does not work
Maurice

Maurice Arthur 12-27-2003 03:21 AM

fcitx
 
Downloaded fcitx
Installed to step 4
Unable to find ~/.bashrc in /home/simpuser
Added Windows fonts but Pinyin fonts do not show up in linux.
Cd /usr/bin 1n -sf fcitx chinput Not found
Have reached sofar but unable to print LinuxSir.org page in Chinese the fonts are not installed
Any help appreciated
Maurice

fiets 01-04-2004 07:42 PM

Had to take a few days off, xmas and stuff, so first of all happy new year...

for Maurice:
Quote:

Unable to find ~/.bashrc in /home/simpuser
open up your console and type ls -a and you'll find the hidden files: .bashrc should be listed.
Now open up an editor e.g. emacs by typing "emacs .bashrc" in the console and you can modify the .bashrc file.

For the rest, it's completely as JDW mentioned.


As for me, I installed mandrake 9.2 as recommended by JDW. Mandrake 9.2 comes included with xcin and chinput. I was pleasantly surprised, as it saved me the hassle of getting these programms running.First I thought I could just as easily run a Chinese locale by adding a user with a Chinese layout but this did not work as both the user I added for Big5 and for GB missed essential characters in the GUI. Then I did as indicated by JDW.
So JDW, this was a pretty good description, but I won't let you off this easily: what you described here was not mentioned in any HOWTO or description I've found so far: where did you find it?

Obviously this still leaves me with more questions:

1 The Chinese GB characters displayed in the GUI seem rather small, this is hard to read: where does one change the settings?
2 OOwriter gives me the choice of using only one 2 GB fonts: either KaitiM or SungTiL. So far I've only tried the whole thing out with oowriter: are there
other GB fonts installed on the system that aren't listed for this particular application or should they be installed manually after wards?
3 Can one set the locale for both GB and BIG5 for one user or should they be set for different users? I mean suppose I want to create a text with both GB and BIG5? How do you do that?
4 On the other hand can one set the locale for more than one XIM input servers, e.g both xcin and chinput?
5 Can one use the input serve (xcin, chinput) with 2 different applications like oowriter and kmail at the same time? I've not been able to find this out so far.
6 I've no experience so far with any xterm application: what do you use cxterm for?

This will do for now, right now I'm glad I've been able to find a way to type Chinese in Linux for the very first time and have the opportunity to write
Chinese in one and the same document with German, which is something I've never materialized in Windows ;-).

JDW 01-04-2004 09:04 PM

contemplations on Linux and Chinese wordprocessing
 
Hi,

Thanks for the compliments, I actually wrote this stuff out at work (during lunch time of course;-), I didn't actually get these instructions from any one particular place, but through trial and error and a lot of reading of user groups (i've noticed Linux/Unix is like that!) I have sort of worked it out (albeit slowly & bit by bit) on my own.

You have many questions, I will try to answer them as best I can, remember I am still very "newbie" in a lot of areas, so here goes :-

1) Chinese characters to small in the input window - there must be a line that can fix this somewhere in the config file (in /etc somewhere?) - i'm just not really sure

2) You only get 2 fonts with the distro, but you can look around on the Net for many good ones

3) GB / Big5 should have their own users...you can still launch apps with them simultaneously...

4) & 5) Not that I'm aware of/not that I've tried - I will check tonight

6) cxterm is just an editor that is Chinese-enabled that is a terminal window app (i.e. without GUI stuff)

good to hear that you've had some success getting Chinese input happening in Linux...

JDW

Maurice Arthur 01-05-2004 02:11 AM

Chinese fonts
 
Many thanks for reply and Wish you well for 2004
JDW has added further comments.
Will attempt adding the fonts that I have when I recover from system error
can boot up and type startx but startx just pops up a text eror screen regarding XF86 Config-4 etc
So no mandrake 9.1 as yet on line
A good linux new year for me.
Keep on learning linux I might be able to use VIM
Regards
Maurice

Jiawen 01-06-2004 02:08 PM

On the topic of Chinese fonts, I found Alastair Tse's Chinese Fonts page extremely useful. Basically what it comes down to is, there aren't very many freely available Chinese fonts that work with Linux. I'm still trying to get the fonts I bought here in Taiwan to work. :(

Also check out Tse's excelent Chinese input howto. Although it's written for Gentoo, a lot of what he says is applicable to other distributions. He has good reviews of the different input systems and descriptions of how to get them running.

Finally, about cxterm and RXvt and other terminals: they're mostly useful for doing system modifications and maintenance, though you rarely need Chinese input for that. One thing they are very useful for, though, is getting onto Chinese BBS systems. For example, there's a huge and thriving Linux community on a local Taiwanese BBS, KKCity. I use RXvt to get there. I have a mini-howto for doing this with telnet and RXvt; does anyone here know how to do it under ssh?

fiets 01-07-2004 02:55 PM

JDW,

As for my previous questions:
1
well, what I actually meant was that the font displayed in the x window system was too small to read in a confy way:
This however is solved easily by going to fonts in the kde control module (configuration -> kde -> looknfeel -> fonts) and chance the size of the fonts displayed (and font itself if you choose to).
This does not change the size of the fonts in window/status bar the application: e.g. oowriter, If anyone knows how to chance the size of the fonts in the application itself, please let me know.
Questions 3,4 and 5 should be irrelevant, if indeed as you mention one can login as different useres simultanously.

So know, as recommended by JDW I added 2 users with Chinese locale: one for GB with chinput (simpuser 1)and one for Big 5 with xcin (simpuser2).

so here's my next set of questions ;-):
I log in as either simpuser1 or simpuser2

1) simpuser1 is working with oowriter but does not seem to work or even start with kmail: did I overlook something? and as for oowriter: sometimes chinput seems to open as a "DOS" like input screen with all possible characters listed horizontally (and correctly).
On other occasions however, it opens in a very small screen with a half white half red icon with the Chinese character zhong (middle) written in to it.
Then when I type pinyin, the possible characters are listed vertically and most of the possible entries are empty or I get a list of character that according to pinyin rules should not be there at all (when I type ma, I get "fu" entries for example).
Last but not least, when I type chinput in the konsole the message is "can't open input message service. The Chinese Input server is already activated. Does this mean that as long as I'm logged in as simpuser1, chinput is always automatically activated?


2) simpuser2 does not work at all:
when I try to open xcin & kmail in the konsole, I get the following message:
[1] 6789
XCIN (Chinese XIM server) version xcim 2.5.2.3.
(module ver: 20000831, syscin ver 200000210)
(use "-h" option for help)

xcin: locale "zh_TW.Big5" encoding "big5"
xcin error: IMOpenIM() with name "xcin" transport "X/" failed.
[1]+ Exit 255 xcin
[simpuser2@localhost simpuser2]$ kio (KDirWatch) : WARNING: KDirWatch: :removeDIR can't handle ''

when I try xcin & oowriter:
[1] 6856
XCIN (Chinese XIM server) version xcim 2.5.2.3.
(module ver: 20000831, syscin ver 200000210)
(use "-h" option for help)

xcin: locale "zh_TW.Big5" encoding "big5"
xcin error: IMOpenIM() with name "xcin" transport "X/" failed.
[1]+ Exit 255 xcin

Now clearly here's some fundamental error, the question is: where?
xcin was installed by default with Mandrake 9.2, so possibly it needs to be configured?

Last but not least a silly question:
In an earlier message you stated:
Quote:

while I am logged in as my main English user-name, I can log into my Chinese user at the same time.
How do you log in thru the command line? when I try to login thru the konsole, I get the message:
no utmp entry. You must exec "login" from the lowest level "sh". I've no clue as to where this should be done?


For Jiawen,

Thanks for the contribution.
As for the fonts, I'll dive in to that in a later stage, when I get it all configured in such a way that the system works with what I have now.

As for the Chinese Howto you mention: I came accross it, but when I started out 3 weeks ago I didn't even know how to login.
What I like about Mandrake 9.2 is that it comes with xcin and chinput by default so I did not have to worry about installing those applications.
I'll worry about fcitx in a later, hopefully more mature, stage of my life with Linux.

And thanks for the info on terminals. This also will be something to worry about later (if at all).

JDW 01-07-2004 04:27 PM

contemplations on Linux and Chinese wordprocessing
 
Hi fiets,

I will be brief as I am at work and they just don't understand! ;-)

1) font size in oowriter - can change it quite siomply in the toolbar next to the name of the font (can pick 28 point size for nice big fonts)

2) i notice that various apps do not work with chinput, here is a great suggestion, fcitx has just released its Version 2.0, which has a great zhineng pinyin input...go to www. fcitx.org for download and instructions on installation and use. just remember to change the XMODIFIERS line in your .bashrc file to export XMODIFIERS=@im=fcitx

fcitx has worked with every app I have tested it with, OOffice, KOffice, Kmail, Evolution, Mozilla Mail etc. can't be happier than that!

3) for xcin, you have to change 2 lines in the xcinrc file, asd follows :-
As root, edit the file /etc/chinese/xcin/xcinrc to change the following lines to "NO" (they are defaulted as "YES") :-

(define XCIN_HIDE "NO")
and
(define OVERSPOT_WINDOW_ONLY "NO")
that should solve the xcin problem...

4) to log into chinese user while in english user, start Konsole, and then type :

$ su chinese_user_name
$password :
$fcitx & kmail

et voila!

if you have further questions, keep asking! that's what this forum is all about...

cheers and have fun with that...

jdw

fiets 01-08-2004 07:07 PM

Quote:

I will be brief as I am at work and they just don't understand! ;-)
well, can't really blame them, neither do I ;-).

1 oowriter: I wasn't referring to the size of the font in the document, but to the size of the font in the status bars within the application itself (and not the x-window). It's incredibly small.

As for xcin: ok, I edited the xcinrc file and now at least xcin starts. Still I do not understand how to use it: I toggle with the trigger keys as described at the howto and indeed I do manage to get a few characters while pushing a random letter on my keyboard when set to Cantonese, Jianyi or other input methods, but not while set to pinyin: then I just see the pinyin I submitted. What's more, while set to whatever inout method, I do not see how to transfer the possible output to the application ( I opened kmail for testing)??

As for fcitx: this is what I dreaded most: to have to install a program not included in the default installation (being also one of the reasons why I thought about mandrake in the frist place...)
You know I've got about 3 kilos of Linux reference manuals around me and not a single manual helps out on easy reference e.g as to how to install. It's not the learning curve I fear about, it's the lack of any curve at all that I dread: I still feel like I'm drowning...
Now I downloaded fcitx which now resides in my documents section as a user. I opened it with Ark to try to read the documentation. Now guess what? Konqueror opens the html file, but can't read all the characters....Somehow I get the impression I'm turning round in circles.
Anyway, I got it installed and it looks promising (but so did xcin and chinput). Again though I do not see how to transfer the characters to the test application (again kmail).
And then there is this message in my console after I opened fcitx:
kdecore (KAccel): WARNING: g_bKillAccelOverride set, but received an event other than AccelOverride.

And I'm too 4 letter word tired now.....to be continued.

JDW 01-08-2004 08:25 PM

contemplations on Linux and Chinese wordprocessing
 
Hi,

Re the installation of new software, it is not that difficult, although to the newbie it is fairly daunting. From personal experience a lot of trial & error has been involved.

That being said, I found the installation of fcitx v2.0 in Mandrake 9.2 to be faultless, and if you only wish to use pinyin input & simplified Chinese for douments, emails etc then I wouldn't find it necessary to use either chinput or xcin, as fcitx seems to work well with anything that involves Chinese word processing.

In a nutshell, what I did to get it going was put the fcitx-2.0.tar.bz2 file (this is the source code file) into my /home/john/bin directory, where I unpacked it with the following command-line command in a Konsole window :-

$ tar jxvf fcitx-20..tar.bz2

have a read of the README files and any similar files that are there...

then I changed to the newly-created /home/john/bin/fcitx directory, and ran the following commands :-

$ make clean
$ make

this compiles the program on your system...

then I logged in as root user, as follows :-

$su
password :
then ran the following command :-

# make install

this step will actually install the fcitx program on your Linux system, and will install the executable (or binary) file in the /usr/bin directory (hence the need to do this command as root user, as this directory belongs to root).

log out of root (CTRL+D is the quickest way), then log in as your previously created simplified Chinese user (I call mine "GB"), and run the following command :-

$ fcitx & kmail

and it works!

Getting off the track a bit, Linux is a great learning curve, and I find that the best advice I ever read for learning Linux/Unix was to read the documentation at least three times before you attempt to do things. Linux requires a lot of effort, but when you realise that you don't need or rely on Bill's Windows anymore it is all worthwhile...

cheers...


All times are GMT -5. The time now is 05:43 AM.