个人工具

“UbuntuHelp:SCIM”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/SCIM}}
 
{{From|https://help.ubuntu.com/community/SCIM}}
 
{{Languages|UbuntuHelp:SCIM}}
 
{{Languages|UbuntuHelp:SCIM}}
 
 
''This page is an attempt to become an easy and simple official method to help any user set up SCIM in Ubuntu. SCIM is used to input different languages, most often Asian languages like Chinese, Japanese or Korean, but it can be used to input many other languages as well. For further explanations, please go to https://wiki.ubuntu.com/InputMethods/SCIM/Setup''
 
''This page is an attempt to become an easy and simple official method to help any user set up SCIM in Ubuntu. SCIM is used to input different languages, most often Asian languages like Chinese, Japanese or Korean, but it can be used to input many other languages as well. For further explanations, please go to https://wiki.ubuntu.com/InputMethods/SCIM/Setup''
 
 
For Kubuntu, see [[UbuntuHelp:/Kubuntu]]
 
For Kubuntu, see [[UbuntuHelp:/Kubuntu]]
 
 
To install im-ja, an alternative Japanese input method, please see [[UbuntuHelp:ImJa]].
 
To install im-ja, an alternative Japanese input method, please see [[UbuntuHelp:ImJa]].
 
 
Note : on Ubuntu 7.10 Gutsy Gibbon and Ubuntu 7.04 Feisty Fawn, you only need to do the Quick Setup, plus one more step in case your session is not using a CJK (Chinese, Japanese or Korean) language, which would be the case of most occidental languages.
 
Note : on Ubuntu 7.10 Gutsy Gibbon and Ubuntu 7.04 Feisty Fawn, you only need to do the Quick Setup, plus one more step in case your session is not using a CJK (Chinese, Japanese or Korean) language, which would be the case of most occidental languages.
 
 
== Quick setup ==
 
== Quick setup ==
 
 
 
''SCIM is the name of the program that will allow you to input a CJK language in Ubuntu.''
 
''SCIM is the name of the program that will allow you to input a CJK language in Ubuntu.''
 
+
1.#1 Open System>Administration>Language Support[[FootNote(You'll need administrative rights for these kind of tasks, else ask your system administrator to install it for you.)]]:
 
+
*#1 Open System>Administration>Language Support[[FootNote(You'll need administrative rights for these kind of tasks, else ask your system administrator to install it for you.)]]:
+
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Menus.jpg
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Menus.jpg
 
+
2.#2 and install the support package corresponding to the language you want to input[[FootNote(You'll need an Internet connection because these packages don't fit on the Install CD.)]]:
*#2 and install the support package corresponding to the language you want to input[[FootNote(You'll need an Internet connection because these packages don't fit on the Install CD.)]]:
+
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Screenshot-Language_Support.png
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Screenshot-Language_Support.png
 
+
3.#3 under Gutsy or Feisty, you will have to check the box at the bottom (Input Method) to activate complex characters input. You will have to uncheck it, click Apply, then check it again and click Apply.
*#3 under Gutsy or Feisty, you will have to check the box at the bottom (Input Method) to activate complex characters input. You will have to uncheck it, click Apply, then check it again and click Apply.
+
4.#4 then log out (System>Quit>Log Out), and login again.
 
+
*#4 then log out (System>Quit>Log Out), and login again.
+
 
+
 
+
 
If your session is using a CJK language (for example, all you menus are in Chinese, Japanese or Korean) you should be able to input it in any application (go to [[Using Using SCIM]] to learn how to do it).
 
If your session is using a CJK language (for example, all you menus are in Chinese, Japanese or Korean) you should be able to input it in any application (go to [[Using Using SCIM]] to learn how to do it).
 
 
=== Additional configuration if you're not using a CJK session ===
 
=== Additional configuration if you're not using a CJK session ===
 
 
'''Note :''' ''You should already be able to use SCIM input in a few applications, like gedit (Application>Accessories>Text Editor), by right clicking on the document, then selecting Input Methods>SCIM Input Method. However, it won't work in the others, like Open Office. On Gutsy, you might also notice that installing scim have broken deadkeys support - for example, you won't be able to type î, because typing the <sup> key before the i key will result in </sup>i. Do not worry, the following steps will ensure both deadkeys and scim will work together.''
 
'''Note :''' ''You should already be able to use SCIM input in a few applications, like gedit (Application>Accessories>Text Editor), by right clicking on the document, then selecting Input Methods>SCIM Input Method. However, it won't work in the others, like Open Office. On Gutsy, you might also notice that installing scim have broken deadkeys support - for example, you won't be able to type î, because typing the <sup> key before the i key will result in </sup>i. Do not worry, the following steps will ensure both deadkeys and scim will work together.''
 
 
==== Under Ubuntu 7.10 Gutsy Gibbon ====
 
==== Under Ubuntu 7.10 Gutsy Gibbon ====
 
+
1.#1 Open System>Administration>Synaptic Package Manager[[FootNote(You'll need administrative rights for these kind of tasks, else ask your system administrator to install it for you.)]] and install the package named scim-bridge :
*#1 Open System>Administration>Synaptic Package Manager[[FootNote(You'll need administrative rights for these kind of tasks, else ask your system administrator to install it for you.)]] and install the package named scim-bridge :
+
 
+
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Screenshot-SynapticPackageManager_scim-bridge.png
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Screenshot-SynapticPackageManager_scim-bridge.png
 
 
Alternatively, if you prefer the command line, you can type in a terminal :
 
Alternatively, if you prefer the command line, you can type in a terminal :
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install scim-bridge</nowiki></pre>
 
sudo apt-get install scim-bridge</nowiki></pre>
 
 
If you want to use scim input in KDE applications, like Amarok or k3b, you will also have to install the package scim-bridge-client-qt using one of the two aforementioned methods (the package scim-bridge-client-gtk, for Gnome applications, should have been installed automatically along with scim-bridge).
 
If you want to use scim input in KDE applications, like Amarok or k3b, you will also have to install the package scim-bridge-client-qt using one of the two aforementioned methods (the package scim-bridge-client-gtk, for Gnome applications, should have been installed automatically along with scim-bridge).
 
+
2.#2 Edit the file /etc/X11/xinit/xinput.d/scim by typing in a terminal (Applications>Accessories>Terminal):
*#2 Edit the file /etc/X11/xinit/xinput.d/scim by typing in a terminal (Applications>Accessories>Terminal):
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo gedit /etc/X11/xinit/xinput.d/scim</nowiki></pre>
 
sudo gedit /etc/X11/xinit/xinput.d/scim</nowiki></pre>
 
 
Change the line :
 
Change the line :
 
<pre><nowiki>
 
<pre><nowiki>
第55行: 第32行:
 
<pre><nowiki>
 
<pre><nowiki>
 
GTK_IM_MODULE="scim-bridge"</nowiki></pre>
 
GTK_IM_MODULE="scim-bridge"</nowiki></pre>
 
 
If you want to use scim input in KDE applications, you will also have to change the following line :
 
If you want to use scim input in KDE applications, you will also have to change the following line :
 
<pre><nowiki>
 
<pre><nowiki>
第62行: 第38行:
 
<pre><nowiki>
 
<pre><nowiki>
 
QT_IM_MODULE="scim-bridge"</nowiki></pre>
 
QT_IM_MODULE="scim-bridge"</nowiki></pre>
 
 
The resulting file will look like this:
 
The resulting file will look like this:
 
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Screenshot-scim-gedit.png
 
https://help.ubuntu.com/community/SCIM?action=AttachFile&do=get&target=Screenshot-scim-gedit.png
 
 
Save the file, then to be sure you won't be affected by previous configurations you can delete the folders .scim and .xinput in your home directory. Since they are hidden folder, you can make them appear in Nautilus with the shortcut Ctrl+H.
 
Save the file, then to be sure you won't be affected by previous configurations you can delete the folders .scim and .xinput in your home directory. Since they are hidden folder, you can make them appear in Nautilus with the shortcut Ctrl+H.
 
 
Now restart your computer and you should be done :)  
 
Now restart your computer and you should be done :)  
 
 
==== Under Ubuntu versions prior to Ubuntu 7.10 ====
 
==== Under Ubuntu versions prior to Ubuntu 7.10 ====
 
 
The recommended method to set up SCIM input for all applications is using a command-line tool called im-switch (where im stands for Input Method, obviously :) ). Before that, you will have to know the name of the locale you're using. In a terminal (Applications>Accessories>Terminal) type :
 
The recommended method to set up SCIM input for all applications is using a command-line tool called im-switch (where im stands for Input Method, obviously :) ). Before that, you will have to know the name of the locale you're using. In a terminal (Applications>Accessories>Terminal) type :
 
<pre><nowiki>
 
<pre><nowiki>
 
locale | grep LANG=</nowiki></pre>
 
locale | grep LANG=</nowiki></pre>
 
 
The anwer would be something like   
 
The anwer would be something like   
 
<pre><nowiki>
 
<pre><nowiki>
 
LANG=en_GB.UTF-8</nowiki></pre>  where the relevant part is <code><nowiki>en_GB</nowiki></code> (<code><nowiki>en</nowiki></code> standing for English and <code><nowiki>GB</nowiki></code> for the country, here Great Britain). Another example could be <code><nowiki>fr_FR</nowiki></code> (<code><nowiki>fr</nowiki></code> for French and <code><nowiki>FR</nowiki></code> for France).
 
LANG=en_GB.UTF-8</nowiki></pre>  where the relevant part is <code><nowiki>en_GB</nowiki></code> (<code><nowiki>en</nowiki></code> standing for English and <code><nowiki>GB</nowiki></code> for the country, here Great Britain). Another example could be <code><nowiki>fr_FR</nowiki></code> (<code><nowiki>fr</nowiki></code> for French and <code><nowiki>FR</nowiki></code> for France).
 
 
Now you just have to install an additional package called {{scim-qtimm}} and tell the system you want to use SCIM as the input method for your locale, using   
 
Now you just have to install an additional package called {{scim-qtimm}} and tell the system you want to use SCIM as the input method for your locale, using   
 
<pre><nowiki>
 
<pre><nowiki>
第87行: 第55行:
 
sudo apt-get install scim-qtimm
 
sudo apt-get install scim-qtimm
 
im-switch -z en_GB -s scim</nowiki></pre>  
 
im-switch -z en_GB -s scim</nowiki></pre>  
 
 
Log out, then log in again. SCIM should be now the default input for all applications (go to [[Using Using SCIM]] to learn how to use it)
 
Log out, then log in again. SCIM should be now the default input for all applications (go to [[Using Using SCIM]] to learn how to use it)
 
 
'''Note for Xubuntu users :''' On Xubuntu, the system will ask you first to install the package libapt-pkg-perl. Install it from Synaptic (see above) or by the command line :
 
'''Note for Xubuntu users :''' On Xubuntu, the system will ask you first to install the package libapt-pkg-perl. Install it from Synaptic (see above) or by the command line :
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install libapt-pkg-perl</nowiki></pre>
 
sudo apt-get install libapt-pkg-perl</nowiki></pre>
 
 
Then you'll be ready to use im-switch (see just above). In Xubuntu, you will also have to apply the following instructions :
 
Then you'll be ready to use im-switch (see just above). In Xubuntu, you will also have to apply the following instructions :
 
 
==== In case all of this doesn't work ====
 
==== In case all of this doesn't work ====
 
 
You might have to add your locale as a supported locale, by editing (you might have to create it) the file  ~/.scim/global (the ~ means it's in your home directory, the . that .scim directory is a hidden file. Just type in a terminal :
 
You might have to add your locale as a supported locale, by editing (you might have to create it) the file  ~/.scim/global (the ~ means it's in your home directory, the . that .scim directory is a hidden file. Just type in a terminal :
 
<pre><nowiki>
 
<pre><nowiki>
 
gedit ~/.scim/global </nowiki></pre>  
 
gedit ~/.scim/global </nowiki></pre>  
 
 
If you can find a line like   
 
If you can find a line like   
 
<pre><nowiki>
 
<pre><nowiki>
第109行: 第70行:
 
<pre><nowiki>
 
<pre><nowiki>
 
/SupportedUnicodeLocales = en_US.UTF-8,en_GB.UTF-8 </nowiki></pre>
 
/SupportedUnicodeLocales = en_US.UTF-8,en_GB.UTF-8 </nowiki></pre>
 
 
If the line wasn't there, create it, then save the file.
 
If the line wasn't there, create it, then save the file.
 
 
Log out, then log in and you should be able to use SCIM input in every application.  
 
Log out, then log in and you should be able to use SCIM input in every application.  
 
 
=== Binary Incompatibilities with Some Apps ===
 
=== Binary Incompatibilities with Some Apps ===
 
 
''Note:'' On Edgy (and possibly under Dapper, not tested), after making these changes, some applications (such as OpenOffice) may fail to start, or may appear to start and then simply die.  If you encounter this issue, try using the "scim_xim" option for im-switch instead of "scim", for example:
 
''Note:'' On Edgy (and possibly under Dapper, not tested), after making these changes, some applications (such as OpenOffice) may fail to start, or may appear to start and then simply die.  If you encounter this issue, try using the "scim_xim" option for im-switch instead of "scim", for example:
 
 
<code><nowiki>im-switch -z en_GB -s scim_xim</nowiki></code>
 
<code><nowiki>im-switch -z en_GB -s scim_xim</nowiki></code>
 
 
[[Anchor(Using)]]
 
[[Anchor(Using)]]
 
== Using SCIM ==
 
== Using SCIM ==
 
 
SCIM should now start along with every application. To trigger it, use any of these shortcut keys : Control+space, Shift+space, Zenkaku_Hankaku(on Japanese keyboard), Hangul(on Korean keyboard)
 
SCIM should now start along with every application. To trigger it, use any of these shortcut keys : Control+space, Shift+space, Zenkaku_Hankaku(on Japanese keyboard), Hangul(on Korean keyboard)
 
 
While inputting, if you want to switch back and forth between your CJK language and your session language, you can just use the shortcut key. Fast and easy!
 
While inputting, if you want to switch back and forth between your CJK language and your session language, you can just use the shortcut key. Fast and easy!
 
 
''Note:'' If you find that the shortcut key has stopped working, check your Caps Lock status.  The shortcut key for SCIM will not work if Caps Lock is turned on (this is arguably a bug).
 
''Note:'' If you find that the shortcut key has stopped working, check your Caps Lock status.  The shortcut key for SCIM will not work if Caps Lock is turned on (this is arguably a bug).
 
 
== Reverting changes ==
 
== Reverting changes ==
 
 
There are several ways to revert the changes performed above:
 
There are several ways to revert the changes performed above:
 
 
* Use <code><nowiki>im-switch</nowiki></code> to set the input method for your locale to "default", for example:
 
* Use <code><nowiki>im-switch</nowiki></code> to set the input method for your locale to "default", for example:
 
 
<code><nowiki>im-switch -z en_GB -s default</nowiki></code>
 
<code><nowiki>im-switch -z en_GB -s default</nowiki></code>
 
 
* Remove the file in your <code><nowiki>~/.xinput.d</nowiki></code> directory corresponding to the appropriate locale:
 
* Remove the file in your <code><nowiki>~/.xinput.d</nowiki></code> directory corresponding to the appropriate locale:
 
 
<code><nowiki>rm ~/.xinput.d/en_GB</nowiki></code>
 
<code><nowiki>rm ~/.xinput.d/en_GB</nowiki></code>
 
 
* Remove the SCIM package from your system (this should not be needed, and isn't the cleanest method, but should do the job if nothing else does):
 
* Remove the SCIM package from your system (this should not be needed, and isn't the cleanest method, but should do the job if nothing else does):
 
 
<code><nowiki>apt-get remove scim</nowiki></code>
 
<code><nowiki>apt-get remove scim</nowiki></code>
 
 
----
 
----
 
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:CategoryDocumentation]]
 
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:CategoryDocumentation]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月30日 (五) 21:24的版本

This page is an attempt to become an easy and simple official method to help any user set up SCIM in Ubuntu. SCIM is used to input different languages, most often Asian languages like Chinese, Japanese or Korean, but it can be used to input many other languages as well. For further explanations, please go to https://wiki.ubuntu.com/InputMethods/SCIM/Setup For Kubuntu, see UbuntuHelp:/Kubuntu To install im-ja, an alternative Japanese input method, please see UbuntuHelp:ImJa. Note : on Ubuntu 7.10 Gutsy Gibbon and Ubuntu 7.04 Feisty Fawn, you only need to do the Quick Setup, plus one more step in case your session is not using a CJK (Chinese, Japanese or Korean) language, which would be the case of most occidental languages.

Quick setup

SCIM is the name of the program that will allow you to input a CJK language in Ubuntu. 1.#1 Open System>Administration>Language SupportFootNote(You'll need administrative rights for these kind of tasks, else ask your system administrator to install it for you.): SCIM?action=AttachFile&do=get&target=Menus.jpg 2.#2 and install the support package corresponding to the language you want to inputFootNote(You'll need an Internet connection because these packages don't fit on the Install CD.): SCIM?action=AttachFile&do=get&target=Screenshot-Language_Support.png 3.#3 under Gutsy or Feisty, you will have to check the box at the bottom (Input Method) to activate complex characters input. You will have to uncheck it, click Apply, then check it again and click Apply. 4.#4 then log out (System>Quit>Log Out), and login again. If your session is using a CJK language (for example, all you menus are in Chinese, Japanese or Korean) you should be able to input it in any application (go to Using Using SCIM to learn how to do it).

Additional configuration if you're not using a CJK session

Note : You should already be able to use SCIM input in a few applications, like gedit (Application>Accessories>Text Editor), by right clicking on the document, then selecting Input Methods>SCIM Input Method. However, it won't work in the others, like Open Office. On Gutsy, you might also notice that installing scim have broken deadkeys support - for example, you won't be able to type î, because typing the key before the i key will result in i. Do not worry, the following steps will ensure both deadkeys and scim will work together.

Under Ubuntu 7.10 Gutsy Gibbon

1.#1 Open System>Administration>Synaptic Package ManagerFootNote(You'll need administrative rights for these kind of tasks, else ask your system administrator to install it for you.) and install the package named scim-bridge : SCIM?action=AttachFile&do=get&target=Screenshot-SynapticPackageManager_scim-bridge.png Alternatively, if you prefer the command line, you can type in a terminal :

sudo apt-get install scim-bridge

If you want to use scim input in KDE applications, like Amarok or k3b, you will also have to install the package scim-bridge-client-qt using one of the two aforementioned methods (the package scim-bridge-client-gtk, for Gnome applications, should have been installed automatically along with scim-bridge). 2.#2 Edit the file /etc/X11/xinit/xinput.d/scim by typing in a terminal (Applications>Accessories>Terminal):

sudo gedit /etc/X11/xinit/xinput.d/scim

Change the line :

GTK_IM_MODULE=xim

into :

GTK_IM_MODULE="scim-bridge"

If you want to use scim input in KDE applications, you will also have to change the following line :

QT_IM_MODULE=xim

into :

QT_IM_MODULE="scim-bridge"

The resulting file will look like this: SCIM?action=AttachFile&do=get&target=Screenshot-scim-gedit.png Save the file, then to be sure you won't be affected by previous configurations you can delete the folders .scim and .xinput in your home directory. Since they are hidden folder, you can make them appear in Nautilus with the shortcut Ctrl+H. Now restart your computer and you should be done :)

Under Ubuntu versions prior to Ubuntu 7.10

The recommended method to set up SCIM input for all applications is using a command-line tool called im-switch (where im stands for Input Method, obviously :) ). Before that, you will have to know the name of the locale you're using. In a terminal (Applications>Accessories>Terminal) type :

locale | grep LANG=

The anwer would be something like

LANG=en_GB.UTF-8
where the relevant part is en_GB (en standing for English and GB for the country, here Great Britain). Another example could be fr_FR (fr for French and FR for France).

Now you just have to install an additional package called 模板:Scim-qtimm and tell the system you want to use SCIM as the input method for your locale, using

im-switch -z “your locale” -s scim
In the above example, with an en_GB locale, you would type in the terminal :
sudo apt-get install scim-qtimm
im-switch -z en_GB -s scim

Log out, then log in again. SCIM should be now the default input for all applications (go to Using Using SCIM to learn how to use it) Note for Xubuntu users : On Xubuntu, the system will ask you first to install the package libapt-pkg-perl. Install it from Synaptic (see above) or by the command line :

sudo apt-get install libapt-pkg-perl

Then you'll be ready to use im-switch (see just above). In Xubuntu, you will also have to apply the following instructions :

In case all of this doesn't work

You might have to add your locale as a supported locale, by editing (you might have to create it) the file ~/.scim/global (the ~ means it's in your home directory, the . that .scim directory is a hidden file. Just type in a terminal :

gedit ~/.scim/global 

If you can find a line like

/SupportedUnicodeLocales = en_US.UTF-8

add your locale to it after a coma, not forgetting you need to add the full name reported by locale | grep LANG= after LANG= . In case of English for Great Britain, your line would look like this one :

/SupportedUnicodeLocales = en_US.UTF-8,en_GB.UTF-8 

If the line wasn't there, create it, then save the file. Log out, then log in and you should be able to use SCIM input in every application.

Binary Incompatibilities with Some Apps

Note: On Edgy (and possibly under Dapper, not tested), after making these changes, some applications (such as OpenOffice) may fail to start, or may appear to start and then simply die. If you encounter this issue, try using the "scim_xim" option for im-switch instead of "scim", for example: im-switch -z en_GB -s scim_xim Anchor(Using)

Using SCIM

SCIM should now start along with every application. To trigger it, use any of these shortcut keys : Control+space, Shift+space, Zenkaku_Hankaku(on Japanese keyboard), Hangul(on Korean keyboard) While inputting, if you want to switch back and forth between your CJK language and your session language, you can just use the shortcut key. Fast and easy! Note: If you find that the shortcut key has stopped working, check your Caps Lock status. The shortcut key for SCIM will not work if Caps Lock is turned on (this is arguably a bug).

Reverting changes

There are several ways to revert the changes performed above:

  • Use im-switch to set the input method for your locale to "default", for example:

im-switch -z en_GB -s default

  • Remove the file in your ~/.xinput.d directory corresponding to the appropriate locale:

rm ~/.xinput.d/en_GB

  • Remove the SCIM package from your system (this should not be needed, and isn't the cleanest method, but should do the job if nothing else does):

apt-get remove scim