LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-09-2008, 12:56 AM   #1
chuanweizuo
Member
 
Registered: Feb 2005
Location: China
Distribution: Slackware
Posts: 35

Rep: Reputation: 15
Question SCIM and FCITX in my slackware12.1


My SLK12.1 automatically installed SCIM as input program. The SCIM itself is fairly good, but I encountered problems that launching programs took quite long time.

SCIM daemon had to start ahead of the program I wanted to launch. According to some threads, I let SCIM daemon auto start when KDE started through creating a script in the ~/.kde/Autostart directory.

Now the SCIM started together with KDE, but the problems I mentioned above still existed. With SCIM already run, launching a TERMINAL program still needed about 10 seconds, which was unbearable.

So, I am wondering:

1) maybe you guys can help me fix this low launching program problem. Is SCIM to blame? Or other problems?


2) or I use FCITX instead of SCIM. How do I configure to replace SCIM?
 
Old 06-09-2008, 01:35 AM   #2
zhoun
Member
 
Registered: Oct 2007
Location: anywhere
Distribution: slackware64 current & win7 64 on thinkpad X61
Posts: 104

Rep: Reputation: 18
Use fcitx replace scim:

1. add 4 lines to ~/.profile
Code:
unset QT_IM_MODULE
unset GTK_IM_MODULE
export XMODIFIERS="@im=fcitx"
export XIM_PROGRAM="/usr/bin/fcitx"
2. /etc/gtk-2.0/gtk.immodules,
change the last 4 lines of gtk.immodules to not load scim dynamic lib in chinese locale.

original
Code:
"/usr/lib/gtk-2.0/immodules/im-scim.so"
"scim" "SCIM Input Method" "scim" "/usr/share/locale" "ja:ko:zh"

"/usr/lib/gtk-2.0/immodules/im-scim-bridge.so"
"scim-bridge" "SCIM Bridge Input Method" "" "" ""
change to:
Code:
"/usr/lib/gtk-2.0/immodules/im-scim.so"
"scim" "SCIM Input Method" "scim" "/usr/share/locale" "ja:ko"

"/usr/lib/gtk-2.0/immodules/im-scim-bridge.so"
"scim-bridge" "SCIM Bridge Input Method" "" "" "ja"
3. comment the correspondent line in the /etc/rc.d/rc.M, otherwise /etc/gtk-2.0/gtk.immodules will be overwritten after reboot.
Code:
if [ -x /usr/bin/gtk-query-immodules-2.0 ]; then
  echo "Updating gtk.immodules:  gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules"
#  /usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules 2> /dev/null
fi

Last edited by zhoun; 06-10-2008 at 05:54 AM.
 
Old 12-03-2008, 04:25 AM   #3
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
HI, zhoun,

Got your post, when doing some research, and hope you can help.

For me, I prefer English as the default system language for slackware 12.1, however, given my nationality, I do have to read files written in Chinese, or folders named in Chinse.

Like, I have tried to open folders named in Chinese from my windowxp partition, and slackware just wont reveal anything. However, if I have folder name changed to English, then Konqueror will open everything quite fine.

Could you please help me on this? here is my lang.sh, which might be helpful,
Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
#export LANG=en_US

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#export LANG=C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly.  In those cases, you can set LANG=C before
# starting them.  Still, I'd avoid UTF unless you actually need it.
export LANG=en_US.UTF-8

# Another option for en_US:
#export LANG=en_US.ISO8859-1
Thanks in advance.
Mark
 
Old 12-03-2008, 07:47 AM   #4
zhoun
Member
 
Registered: Oct 2007
Location: anywhere
Distribution: slackware64 current & win7 64 on thinkpad X61
Posts: 104

Rep: Reputation: 18
hi, markluocanada,

I use the locale zh_CN.UTF-8(export LANG=zh_CN.UTF-8),
and mount the win partition with the following command:
# mount -t ntfs-3g -o locale=zh_CN.UTF-8,noatime /mnt/sda3 /mnt/e

Then everything is fine.
 
Old 12-03-2008, 10:06 PM   #5
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
Sorry, zhoun,

I am really a newbie for linux, and I did what you said for the locale alteration, and run the command you mentioned with regards to my specification
Code:
# mount -t ntfs-3g -o locale=zh_CN.UTF-8,noatime /mnt/sda5 /fat-d
, and still no luck. Would you please kindly elaborate a little bit further? and

Here is my new lang.sh,

Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
#export LANG=en_US

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#export LANG=C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly.  In those cases, you can set LANG=C before
# starting them.  Still, I'd avoid UTF unless you actually need it.
export LANG=zh_CN.UTF-8
and also my fstab info,

Code:
/dev/sda8        swap             swap        defaults         0   0
/dev/sda6        /                jfs         defaults         1   1
/dev/sda7        /home            jfs         defaults         1   2
/dev/sda1        /fat-c           ntfs-3g     umask=000        1   0
/dev/sda5	 /fat-d 	  ntfs-3g     umask=000	       1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
none             /proc/sys/fs/binfmt_misc binfmt_misc defaults 0   0
Thanks again.

mark
 
Old 12-04-2008, 06:42 PM   #6
zhoun
Member
 
Registered: Oct 2007
Location: anywhere
Distribution: slackware64 current & win7 64 on thinkpad X61
Posts: 104

Rep: Reputation: 18
hi,

What's your windows paritation type? NTFS or FAT32?

NTFS:
mount -t ntfs-3g -o locale=zh_CN.UTF-8,noatime /mnt/sda5 /fat-d

FAT32:
mount -t vfat -o iocharset=utf8 /dev/sda5 /fat-d
 
Old 12-04-2008, 11:01 PM   #7
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
Hi, Zhoun,

Thanks for the help, and things look somehow better, I can read certain files in Chinese now this time, and I guess I didn't restart the whole system, just ran "startx" to test whether the locale alteration affected anything or not.

After the reboot, my font now looks different, in a good way, which I really like.

So, first, I
Code:
umount /fat-d
, and then used your command:
Code:
mount -t ntfs-3g -o locale=zh_CN.UTF-8,noatime /dev/sda5 /fat-d
,

now everything is working, and just one thing to ask, how can I let my slackware box do the umount thing, and then mount as you mentioned, and what configuration do I need?

THanks again.

Mark
 
Old 12-04-2008, 11:15 PM   #8
zhoun
Member
 
Registered: Oct 2007
Location: anywhere
Distribution: slackware64 current & win7 64 on thinkpad X61
Posts: 104

Rep: Reputation: 18
hi,

edit your /etc/fstab, add the locale option:

/dev/sda1 /fat-c ntfs-3g locale=zh_CN.UTF-8,noatime,umask=000 1 0
/dev/sda5 /fat-d ntfs-3g locale=zh_CN.UTF-8,noatime,umask=000 1 0
 
Old 12-06-2008, 08:23 AM   #9
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
Thank you very much Zhoun,

I finally got this working with your detailed instruction, thanks a lot.

Mark
 
Old 12-15-2008, 07:28 AM   #10
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
Hi Zhoun,

sorry to keep bugging you for the Chinese issue. Since slackware 12.1, with the help of the forum, I was able to get the SCIM going. however, SCIM only works in Firefox, literally only in Firefox. For all other apps, ctrl+spacw won't even activate the SCIM at all.

So how can I get SCIM working in other apps, like Openoffice, and Opera, and kmail etc.

BTW, I have already installed kdei-18n-chinese.

Thanks again.

Mark
 
Old 12-15-2008, 08:15 AM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Please explain what you did to get SCIM working, "with the help of the forum" is not enough. Since I and others have SCIM available in all applications, the same should work for you.

Eric
 
Old 12-16-2008, 04:29 AM   #12
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
Thanks Erics for the reply.

Sorry for not the lack of information, with the help of Bruce Hill, and also I followed some instruction of changes-and-hints.txt of slackware12.1, I got the scim going, Only in firefox.

Just to answer your questions better, here is my /etc/profile.d/lang.sh
Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
#export LANG=en_US

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#export LANG=C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly.  In those cases, you can set LANG=C before
# starting them.  Still, I'd avoid UTF unless you actually need it.
export LANG=zh_CN.UTF-8

# Another option for en_US:
#export LANG=en_US.ISO8859-1

# One side effect of the newer locales is that the sort order
# is no longer according to ASCII values, so the sort order will
# change in many places.  Since this isn't usually expected and
# can break scripts, we'll stick with traditional ASCII sorting.
# If you'd prefer the sort algorithm that goes with your $LANG
# setting, comment this out.
export LC_COLLATE=C

# End of /etc/profile.d/lang.sh
Did I do anything wrong?

The ideal thing I am pursuing would be somehow like using an English version of windows xp, where I can switch to Chinese input anywhere I want, but still have the base system language as English. Hope this won't be too much to ask.

Thanks again Eric.

Mark
 
Old 12-16-2008, 05:01 AM   #13
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
nd also I followed some instruction of changes-and-hints.txt of slackware12.1
Can you be more specific please? Because if you follow all the instructions in the SCIM setup section, it will also work for other applications...

Code:
Input methods for complex characters (CJK, which is shorthand for Chinese,
  Japanese, Korean) and other non-latin character sets have been added. These
  input methods use the SCIM (Smart Common Input Method) platform.
  The environment variables for SCIM support are set in /etc/profile.d/scim.sh
  The requirements for getting SCIM input methods to work in your X session
  are as follows:
  (1) Use a UTF-8 locale. Look in /etc/profile.d/lang.sh for setting your
      language to (for instance) en_US.UTF-8. As a word of warning: maybe you
      should leave root with a non-UTF-8 locale because you don't want root's
      commands to be misinterpreted. You can add the following line to your
      ~/.profile file to enable UTF-8 just for yourself:
        export LANG=en_US.UTF-8
  (2) Make the scim profile scripts executable. These will setup your
      environment correctly for the use of scim with X applications. Run:
        chmod +x /etc/profile.d/scim.*
  (3) Start the scim daemon as soon as your X session starts. The scim daemon
      must be active before any of your X applications. In KDE, you can add a
      shell script to the ~/.kde/Autostart folder that runs the command
      "scim -d". In XFCE you can add "scim -d" to the Autostarted Applications.
      If you boot your computer in runlevel 4 (the graphical XDM/KDM login)
      you can simply add the line "scim -d" to your ~/.xprofile file.
      This gives you a Desktop Environment independent way of starting scim.
  When scim is running, you will see a small keyboard icon in your system tray.
  Right-click it to enter SCIM Setup. In 'Global Setup' select your keyboard
  layout, and you are ready to start entering just about any language
  characters you wish! Press the magical key combo <Control><Space>
  in order to activate or deactivate SCIM input. The SCIM taskbar in the
  desktop's corner allows you to select a language. As you type, SCIM will show
  an overview of applicable character glyphs (if you are inputting complex
  characters like Japanese).
Unfortunately this piece of text was removed from CHANGES_AND_HINTS.TXT in Slackware 12.2, and I did not notice. It should be put back in for the next release IMO.

Probably you did not follow the instruction to make "scim -d" start at the beginning of your X session. Typically when you forget that and you start a GTK based application, scim will start too. And then it will work only for that application. Like your firefox issue.

Eric
 
Old 12-16-2008, 07:40 AM   #14
markluocanada
Member
 
Registered: Dec 2006
Location: Shanghai China
Distribution: Slackware 13.1_x86_32
Posts: 143

Rep: Reputation: 17
Thanks Eric for the reply, and to add this text or instruction back will be quite helpful.

Ok, I think I have finished the first two, just this part
Code:
In KDE, you can add a shell script to the ~/.kde/Autostart folder that runs the command "scim -d".
.

To add a shell script was quite scary for me at first, because I have never done this kind of things before. But after some reading online, I somehow got part of this shell script running ok. However, it won't let me to bash it,
Code:
root@localhost:~# bash scim
/usr/bin/scim: /usr/bin/scim: cannot execute binary file
root@localhost:~# cd .kde
root@localhost:~/.kde# ls
Autostart/        share/             tmp-localhost@
cache-localhost@  socket-localhost@
root@localhost:~/.kde# cd Autostart
root@localhost:~/.kde/Autostart# ls
scim*
root@localhost:~/.kde/Autostart# bash scim
scim: line 4: scim -d: command not found
root@localhost:~/.kde/Autostart#
here is the script I made,
Code:
# My first shell script
#
"scim -d"
The good things, now every time I boot into slackware, one Konsole window will pop up, and if I type scim, it will bring up SCIM, and then SCIM will work in almost all the apps. But still, I want this running in a supposed way.

Thanks.
 
Old 12-16-2008, 10:56 AM   #15
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
The double-quote (") marks are not needed in the script. He was using them to indicate that scim -d is a single-line command.
 
  


Reply



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
SCIM font - got SCIM working, now all flash has japanese font.....help! sandaili Linux - Software 6 03-24-2009 07:27 AM
Fcitx: How does one configure Fcitx? The input and control panels too small to read. harryhaller Slackware 11 06-09-2008 12:37 AM
problem on fcitx 2ndSpace Slackware - Installation 0 12-18-2005 12:11 AM
fcitx Maurice Arthur Mandriva 6 10-21-2004 07:55 PM
fcitx problems hobylinux Linux - Software 13 10-01-2004 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:32 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
Open Source Consulting | Domain Registration