LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 10-17-2007, 03:53 PM   #16
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53

Imho, stable e17 will win easily.
 
Old 10-17-2007, 06:13 PM   #17
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,490

Rep: Reputation: Disabled
Quote:
Originally Posted by reikyv View Post
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 have tried this a few times in the past, and tried again with this link. I always get to the point where I can build it, install it and run it (by which I mean I see processes running and get the applet) but can't seem to invoke it. By which I mean I press Ctrl-Space and nothing happens. Am I missing something?

Brian
 
Old 10-18-2007, 01:36 AM   #18
reikyv
Member
 
Registered: Oct 2007
Location: Malaysia
Distribution: Slackware
Posts: 80

Rep: Reputation: 15
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.
 
Old 10-18-2007, 04:37 AM   #19
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
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.
 
Old 10-18-2007, 05:30 AM   #20
reikyv
Member
 
Registered: Oct 2007
Location: Malaysia
Distribution: Slackware
Posts: 80

Rep: Reputation: 15
Hi Su-Shee,

Thanks for the information, I will try and see. :-p
 
Old 10-18-2007, 05:13 PM   #21
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,490

Rep: Reputation: Disabled
I'm happy to eat my words. I rebooted (something I rarely do) and now it works!

Brian
 
Old 10-18-2007, 06:22 PM   #22
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
How do the fonts look for Chinese with that method? Do they display bold properly, also? How do the English fonts look?
 
Old 10-18-2007, 10:20 PM   #23
reikyv
Member
 
Registered: Oct 2007
Location: Malaysia
Distribution: Slackware
Posts: 80

Rep: Reputation: 15
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
 
Old 10-19-2007, 12:35 AM   #24
Piaculum
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 10-20-2007, 12:21 AM   #25
Piaculum
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Reposted this in a new thread.

Last edited by Piaculum; 10-20-2007 at 12:25 AM.
 
Old 11-03-2007, 03:31 AM   #26
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Post 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/
2. You will need some fonts with proper glyphs for good display. The best ones come
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
mkfontdir
fc-cache
4. Mount your "slackware-12.0-install-d3.iso" or the DVD. There are two packages in
"kdei" we need to install. If "/mnt/cdrom/" is your mount point, issue as root:
Code:
installpkg /mnt/cdrom/slackware/kdei/*zh_CN*.tgz
That should install kde-i18n-zh_CN and koffice-l10n-zh_CN.
(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
6. We need to rebuild freetype with the bytecode interpreter enabled. Here are the steps:
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
and also uncomment line 57:
Code:
#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
and also give it a different version number in line 7, where the file says:
Code:
BUILD=${BUILD:-3}
give it another number, such as 4. Now save the file and run as root:
Code:
sh freetype.SlackBuild --cleanup
which will build a new freetype package with the bytecode interpreter enabled, and sub-pixel
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>
rather than installpkg.

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:
    # export LANG=en_US
export LANG=zh_CN.gb2312
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
export G_BROKEN_FILENAMES=1
9. Reboot ... and configure your system.

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"
If you only want to do this for one user, add the file .gtkrc-2.0 to /home/<user>/
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
Proportional:  Sans-serif           Size: 12
Serif:         Tahoma
Sans-serif:    Vahoma
Proportional:  Tahoma               Size: 12
Minimum font size:  12
Allow pages to choose their own fonts, instead of my selections above (remove the check mark)
Character Encoding
Default Character Encoding: Chinese Simplified (GB2312)

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.

Last edited by Bruce Hill; 11-03-2007 at 10:58 PM. Reason: All files moved to Slackware mirror
 
Old 11-03-2007, 03:37 AM   #27
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
you should make an lq wiki article on that
 
Old 11-03-2007, 03:48 AM   #28
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by AceofSpades19 View Post
you should make an lq wiki article on that
Will submit something, but first I'd like some folks to test the instructions and
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.
 
Old 11-03-2007, 04:28 AM   #29
reikyv
Member
 
Registered: Oct 2007
Location: Malaysia
Distribution: Slackware
Posts: 80

Rep: Reputation: 15
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.
 
Old 11-04-2007, 07:09 PM   #30
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese input djib Debian 20 06-16-2008 02:41 AM
Chinese input Sam Ng Linux - Software 1 05-04-2006 07:02 PM
[SOLVED] Chinese input/printting on Slackware? aihaike Slackware 12 03-14-2006 08:06 PM
Chinese input denning Slackware 16 02-24-2005 01:39 AM
Chinese input Cyberian Fedora 2 02-15-2005 07:32 AM


All times are GMT -5. The time now is 12:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration