Chinese Input in Slackware 12, which WM?
Hi, I'm new to this forum and actually new to Linux altogether. I've finally decided to make the switch from Windows and am choosing Slackware as my first distribution. I have the ISOs but haven't yet installed...still trying to plan out the filesystem.
I just recently moved to China from the States to learn Mandarin as well, and was wondering what my options were under Linux, Slackware in particular, to read and input Chinese characters. I'm not sure if this would be better off in the Software forum, but I thought I'd start here for now. My initial plan was to run Slackware 12 with Blackbox as my primary WM. I've been reading about this for a few days now though, and it seems like there is no international input support for Blackbox. I really love the simplicity of Blackbox, but I guess it might be too simple since I can't find any plugins that support Chinese. I'd rather not go with something heavier like KDE or Gnome if I could help it (although it seems like I may have to) Any thoughts? Thanks in advance for your help. -Matt W. |
You could use xfce instead, it is a lighter Desktop Enviroment, and I'm sure it has multi-lingual support
|
Thanks for the reply Ace, I'll definitely start reading about that right away. Looks like it might be what I'm looking for.
Also, and please forgive me I'm completely new to all of this, I can run blackbox as my default WM and then just boot into Xfce when I need to do work in Chinese, correct? Trying to figure a lot of this out on my own, but it's a whole new world for me. Thanks. |
I am not quite sure what blackbox is, but if it is just another Window Manager/Desktop then yes you could switch between xfce and it.
All is controlled using the .xinitrc (note the dot in front) which is located under your home directory. BTW: if you have figured out how to input Chinese characters under xfce could you please post it back here ? I myself am also looking a way to write some Han Zi documents in Linux...;) |
I don't think it's that easy. I remember helping a friend long time ago to get it running, maybe this changed with newer Xorg versions, but he had to install xcin which means X Window Chinese INput. As you may guess that enabled him to input chinese characters inside X. To display chinese fonts, any program that's able to handle UTF characters (i'm pretty sure that any Gtk/Qt) will do it fine. Firefox on Slackware 12 displays chinese fonts here without any special configuration.
|
Quote:
Btw, I don't think input depends on wm you use but rather on what xorg supports. ๆไำพะั - qwerty in thai using blackbox (setxkbmap th) йцукен - qwerty in russian using bb (setxkbmap ru) ąčęėįšųū - lithuanian spec chars using bb (setxkbmap lt) Talking about bb international support, you probably found info that bb does not use UTF (maybe, I don't use bb so I'm not sure). |
blackbox is a dead project, but it spawned many other projects including fluxbox. You'll find that fluxbox is quite similar but much more capable and has lots of users world-wide. My favorite lightweight wm is windowmaker -has a very good gui configuration tool included which most light wm's are missing. I have lots of ggodies to go with it that you can find here:
http://distro.ibiblio.org/pub/linux/...s/WindowMaker/ Or, in particular DockApps are here: http://distro.ibiblio.org/pub/linux/...load/DockApps/ |
Some colleagues and I are working on a special project called SAS ... Slackware Asian Support.
Chinese input in Slackware is not really hard, but requires a few packages. Our tutorial isn't complete yet, but if you'll post back what you've done (step-by-step) thus far, maybe tomorrow I can help you more. NB: We've setup Chinese input using KDE, since it's the most popular wm. |
Quote:
Brian |
Sometime this week I should be able to get back to that project. The packages needed are:
Quote:
Quote:
Sorry for the brevity, but it's not quite ready yet. It does look very nice, and Chinese fonts will display in bold, also. |
First off, thanks to everyone who has replied so far.
gnashley, I was under the impression that Blackbox was still under development, is that no longer the case? If not, I suppose that would make my decision between Fluxbox and Blackbox an easy one. Bruce, that sounds fantastic. I have decided that I will be running a minimal WM as my primary, but will then boot into KDE for any specific work I have to do requiring Chinese. I'm looking forward to talking with you more about this, but I have to warn you it's all very new to me. (Read: I hope you can be patient :) ) I just installed Slackware last night after figuring out a partition/file system scheme. Everything went smooth but I'm having trouble getting my wireless internet working. I've been reading about it all day though and I think I should be able to get it together tonight. Until then I have to keep switching out my laptop HD to replace it with my stable XP install (I chose not to dual boot). I'll let you know as soon as I'm in business though. -Matt W. |
Matt,
For your wireless, post the output of "/sbin/lspci" from a terminal ... xterm will do, and then post the make and model of your laptop. I think we can provide you with easy help to get your wireless working. We can also get Chinese input working in Fluxbox. Fluxbox is basically a fork of Blackbox, which iirc is no longer maintained. |
Bruce,
I'll get the output of that on here in the morning. I could really use the help. I've been reading literally all day about basic commands, scripts, config files...so much to learn. Daunting, but fun. As far as Fluxbox goes, I think that's definitely what I'll be using for my main WM, and if I can implement Chinese characters through Flux with your SAS that would be the best of both worlds. Really excited for all of this. -Matt W. |
Hi there,
Hope this can help you: http://www.systemscrafter.com/imho/archives/4 I am a Slackware newbie too, but a regular Red Hat user. I have no problem to read Chinese character with a default installation (using Slackware 12.0 now), and with the guide from the URL above, you should be able to input Chinese character. Good luck! |
I went looking for blackbox and had a bit of a surprise to see that there was a new release 2 years ago. I think the project had been completely stalled for quite awhile before that though.
Any way, I still think you'll have better luck and find more community support by using fluxbox, if you like the blackbox style. After KDE, GNOME, XFce and iceWM, fluxbox is the most popular WM around and is the one usually suggested for light-weight usage. I personally prefer wmaker, though. |
Imho, stable e17 will win easily.
|
Quote:
Brian |
Hi,
Basically, this is what I did: 1) Download scim-1.4.7.tar.gz and scim-pinyin-0.5.91.tar.gz from http://www.scim-im.org/downloads/ 2) untar, ./configure, make, make install 3) ldconfig 4) vi /etc/gtk-2.0/gtk.immodules search: "xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh" replace: "xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh:en" 5) vi /etc/profile.d/lang.sh search: export LANG=en_US replace: export LANG=en_US.UTF-8 6) vi /etc/X11/xinit/xinitrc.xfce (I am using XFCE, so if you are using another WM, you need to use the specific xinitrc), add following lines before: XRESOURCES="" export XMODIFIERS="@im=SCIM" export GTK_IM_MODULE=xim export QT_IM_MODULE=xim /usr/local/bin/scim -d P/S: During the installation of my Slackware 12.0, I install all packages. |
I also use scim as input method which works perfectly fine with any window manager you like.
I prefer to combine scim with anything gtk-based, because all applications based on gtk/pango can receive a Unicode character with a keyboard shortcut (ctrl-shift-u<code point>) - which means to type just two or three hanzi, I don't start scim, I just type the code points. (If I know them. ;) Reikvy, that's basically what I've got as a configuration - xim is not the same as "scim". export LC_CTYPE="de_DE.utf-8" export LC_COLLATE="de_DE.utf-8" export LANG=en_US.utf-8 export LC_PAPER="de_DE.utf-8" export XMODIFIERS="@im=SCIM" export XIM_PROGRAM="scim -d" export GTK_IM_MODULE=scim export QT_IM_MODULE=scim scim -f socket -ns socket -d scim -f x11 -s socket -c socket -d In addition to some minor stuff for mutt, vim and less to properly display any kinds of Unicode characters. You don't have to boot KDE or Gnome to work with Hanzi, then - just open applications like Abiword (just an example) within a proper Unicode environment. If you actually want to change a single application into chinese entirely (including menus and stuff), start it with "LANG=zh_CN.utf-8 abiword &" - to stick with this example. I usally just type foreign stuff, but stick with english messages and menus and so on. |
Hi Su-Shee,
Thanks for the information, I will try and see. :-p |
I'm happy to eat my words. I rebooted (something I rarely do) and now it works!
Brian |
How do the fonts look for Chinese with that method? Do they display bold properly, also? How do the English fonts look?
|
Hi,
Have a look yourself: 1) chinese website 2) enlighs website So, you can see that the chinese character rendered in my machine still not that 'pretty' enough, I don't have time to dig into this, there're tonnes of other interesting stuff to do. At least, I feel that I just need to be able to read chinese character, and doesn't matter whether the font looks ugly or not. :-p |
I'm glad I'm not the only one trying to do this!
Bruce, I meant to get that info up here yesterday but to be honest it took me a while to figure out how to get the output of the lspci into a file. (like I said, completely new to all of this.) Even after figuring that out, I had to get my external hard drive mounted so that I could get the file onto that drive (had to learn mnt, fstab, etc.) I know these things are second hand to everyone else, but it's a lot to learn. Where I stand now though is... - I downloaded the tar (tarball?...same thing?) file from www.intellinuxwireless.org after finding that Intel has linux drivers for my wireless card (it's an Intel PRO/Wireless 3945ABG) - After learning how to untar something, I untarred(?) it and attempted to "make" it (soooo much to learn). I got an error message saying that my kernel needed the mac80211 subsystem found at the same website, so i dl'ed that and it's currently sitting on my external hard drive. So, right now I'm reading through the install file to try to figure out how to build this into my kernel. I think it's probably pretty easy but switching between windows and slack just for a network connection is beginning to be a drag. Once I get Flux working (for the life of me I can't get my refresh/sync rates correct - have to call MPC today to try to get the information) and a live wireless connection I will be in a much better position to deal with everything. I'll let you know in a bit how things are working out today. -Matt W. |
Reposted this in a new thread.
|
HOW-TO setup Chinese font display and input in Slackware-12.0
This is a rough draft of what will be a tutorial about Chinese display and input for Slackware-12.0:
HOW-TO setup Chinese font display and input in Slackware-12.0 This HOW-TO explains how to make Slackware-12.0 display good looking Chinese fonts, both normal and bold; sharp, clear English fonts; and Chinese input. All files and packages necessary for this HOW-TO can be downloaded from: http://www.slackware.com/~alien/sas/ ===INSTRUCTIONS FOR CHINESE FONTS=== NB: Follow these steps in this order ... 1. Create a file named "10-myfonts.conf" under "/etc/fonts/conf.avail/". This is the fontconfig configuration file for your new font setup. Rather than creating a new file on your system, you can cp 10-myfonts.conf to "/etc/fonts/conf.avail/" then you need to symlink it to "/etc/fonts/conf.d/" which you can do with this command as root: Code:
ln -s /etc/fonts/conf.avail/10-myfonts.conf /etc/fonts/conf.d/ from Microsoft. Eric Hameleer's has setup a corefonts.SlackBuild which you can use to get and install these fonts. In this HOW-TO we will use Tahoma as the choice for the English font. If you prefer a different font, try what's available on your system. For this HOW-TO you will need SimSun.ttf for Chinese fonts. 3. Copy the needed fonts to "/usr/share/fonts/TTF/". Then change the permissions by issuing "chmod 644 /usr/share/fonts/TTF/*ttf". Next you'll need to run the following commands as root in the "/usr/share/fonts/TTF/" directory: Code:
mkfontscale "kdei" we need to install. If "/mnt/cdrom/" is your mount point, issue as root: Code:
installpkg /mnt/cdrom/slackware/kdei/*zh_CN*.tgz (If you're interested, I also have a Chinese build of Open Office available that works great for Chinese and English. The latest stable Chinese source was 2.1.1, and there's also an English OOo package with the 2.3.0 source. Email me for them.) 5. Next we need new Slackware packages for "freetype and libXft". Pat V. rebuilt the libXft package and put it in Slackware -current for testing, so you can download it from here or your local mirror, and install it with the command: Code:
upgradepkg libXft-2.1.12-i486-2.tgz From the Slackware source (../slackware-12.0/source/l/freetype/) get all those files and put them in one directory. Then you can edit "freetype.SlackBuild" and uncomment (remove the # from in front of) line 50: Code:
#zcat $CWD/freetype.bytecode.interpreter.diff.gz | patch -p1 --verbose || exit 1 Code:
#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1 Code:
BUILD=${BUILD:-3} Code:
sh freetype.SlackBuild --cleanup hinting. (Latest testing shows the stock FreeType package might be okay after installing the new libXft, so try that before you rebuild FreeType.) NB: You can get the latest source and rebuild FreeType yourself if you prefer, but IMO a Slackware package built with an official Slackware SlackBuild script is best; so even if you elect to use the latest freetype source, use the Slackware SlackBuild. After it's built, you can look in /tmp/ for the new Slackpackage and install it as usual, but use Code:
upgradepkg <packagename> 7. For Chinese input, you will need scim, scim-tables, and scim-pinyin. You can either build them yourself, download them from http://www.slackware.com/~alien/sas/ or build them using the SlackBuilds from that repository. These are new packages for Slackware, so you can install them all using "installpkg <packagename>". 8. Now we need to setup the language selections. Edit "/etc/profile.d/lang.sh" like this: Code:
# en_US is the Slackware default locale: 10. Open the KDE control center, and select Appearance & Themes > Fonts Choose "Adjust All Fonts" and under "Requested Font" put a check mark in Font and then choose "Tahoma". Select OK and then change "Use anti-aliasing" to Disabled, then change "Force fonts DPI" to "96 DPI". Select "Apply" then from the File menu select Quit. Now shutdown your X server, and then issue "startx" again. 11. For Konsole I selected "Lucida Console, regular, 10". Choose one that you like. 12. For System-wide configuration of Gtk apps, add a file named "gtkrc" to /etc/gtk-2.0/ with this text: Code:
gtk-font-name = "Tahoma 9" and put the text in it. In theory, you could change the Gtk font for each user on the system. You may select another font if you don't like Tahoma. 13. For web browsing we choose Mozilla Firefox. It's fonts need to be changed, so open Firefox and choose "Edit > Preferences > Content" and in "Fonts & Colors" choose "Advanced" and select some fonts. I have: Code:
Fonts for: Simplified Chinese You should how have sharp looking Chinese fonts - able to display bold, also. The English fonts should also look good. You might change some of my font selections to suit your taste. The app SCIM (Smart Common Input Method) is started when you boot your computer. You only need to press "Ctrl+Space" to switch from English to Chinese input. There is a SCIM setup menu you can read by right-clicking on the SCIM keyboard icon in the system tray. I've deselected all the languages and input methods except Chinese Simplified. If you can't read the Chinese to do that, perhaps this screenshot will suffice. If you have any questions about this guide, please post them in this thread. If the OP has an objection to using his thread, we'll edit this post and move the guide. Once this has a few days to filter through the userbase, I'll write and submit a tutorial for moderator approval in the Tutorials section. The screenshots included at http://www.slackware.com/~alien/sas/screenshots/ should speak for themselves. NB: Special thanks to Eric Hameleer's (Alien Bob) and LeiDan for help in getting this far. |
you should make an lq wiki article on that
|
Quote:
see if it hoses their systems. It was all written in vim while doing it, without much sleep. If it passes the forum test, it will be in a nice, easy to read format. |
Hi, thanks for the how-to.
Anyway I didn't follow the guide exactly, but just extract part of it (because I am able to read and input Chinese already) - copy the simhei and simsun from Windows\Fonts to /usr/share/fonts/TTF/ and run those commands. |
Piaculum,
I tested SCIM and the fonts of this tutorial with Fluxbox, and it works. My test machine does not have a good looking, properly configured Fluxbox. For my first few years with Slackware I ran Flux, but switched to KDE because it seemed easier for guys coming from Windoze to Slackware. I build and repair computers, and must deliver something that is pretty much intuitive for someone coming from the darkside. KDE is much more so than Fluxbox. However, I'm about to setup a desktop with Fluxbox for testing, and to enjoy a window manager that does not suck up all my resources like KDE. |
Regarding CJK (Chinese/Japanese/Korean) TrueType Fonts:
I created two packages for Slackware 12.0 that install the "Han Nom" high-quality Unicode font (free for non-commercial use, which also supports Vietnamese script), and the Arphic Mingti Unicode font (derived from the Arphic font), also a high-quality font and totally free. http://www.slackware.com/~alien/slackbuilds/hannom/ http://www.slackware.com/~alien/slac...-arphic-uming/ For the font package to install on Slackware 11.0 or earlier, simply rebuild the package on your system using the SlackBuild script plus sources - the script will figure out the correct TTF path for your version of X (Slackware 12.0 uses /usr/share/fonts/TTF but previous versions of Slackware use /usr/X11R6/lib/X11/fonts/TTF). Please tell me how you like these fonts, or if you use a different, better (and also free!) font. Eric |
There are several threads with already made and perfectly working bytecode interpreter enabled freetype-packages. So, for Slackware user's there absolutely no need to patch the stuff on their own, the packages are nicely made and work perfectly well. Click here
And maybe this is helpful either. |
THANKS GUYS!!!
Just spent a whole day trying to get scim/skim working on my Slack 11 box. Quote:
BashTin. |
All times are GMT -5. The time now is 07:49 PM. |