RevPi Core 3 with Chinese typewriting

Topics about the Software of Revolution Pi
Post Reply
hikaru2001
Posts: 38
Joined: 18 Feb 2019, 04:13
Answers: 0

RevPi Core 3 with Chinese typewriting

Post by hikaru2001 »

Hello,

I want to typewrite Chinese word in the graphical interface of RevPi Core 3. Could you pls tell me how to do that? Thank you!
zhan
Posts: 52
Joined: 16 Apr 2019, 13:31
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by zhan »

Hi, generally speaking, to type Chinese in RevPi Core, what you need is the SCIM (https://sourceforge.net/projects/scim/).
I have tested it with RevPi Core 3, and here I would like to give you some hint about the steps:
1. Config the locales with following command

Code: Select all

sudo dpkg-reconfigure locales
and choose the following items if you use simplified Chinese
  • en_US ISO-8859-1
  • zh_CN GB2312
  • zh_CN.GBK GBK
  • zh_CN.UTF-8 UTF-8
if you use traditional Chinese, consider following items:
  • zh_TW BIG5
  • zh_TW.UTF-8 UTF-8
  • zh_HK BIG5-HKSCS
  • zh_HK.UTF-8 UTF-8
and following items might be better for Singapore's Chinese characters:
  • zh_SG GB2312
  • zh_SG.GBK GBK
2. Install the Chinese Fonts with following command

Code: Select all

sudo apt-get install fonts-arphic-gbsn00lp fonts-arphic-gkai00mp
other possible fonts sets might be fonts-arphic-bkai00mp, fonts-arphic-bsmi00lp, fonts-arphic-ukai, fonts-arphic-uming
3. Install the SCIM

Code: Select all

sudo apt-get install scim scim-pinyin scim-tables-zh
4. Before startx, export LANG and XMODIFIERS with following commands

Code: Select all

export LANG="zh_CN.gb2312"
export XMODIFIERS="@im=SCIM"
variable LANG might be zh_TW BIG5, etc for other Language sets
5. After startx, start the scim as a deamon

Code: Select all

scim -d
6. Then with CTRL + Space, you can switch the input methods
Simon
hikaru2001
Posts: 38
Joined: 18 Feb 2019, 04:13
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by hikaru2001 »

Hello Zhan,

I have tried all the steps and installed scim successfully. However I still can't use Ctrl+Space to switch the input methods. I also use another key board, but it still doesn't work. Do you have some idea?
Attachments
c.jpg
c.jpg (32.68 KiB) Viewed 4631 times
b.jpg
b.jpg (36.38 KiB) Viewed 4631 times
a.jpg
a.jpg (109.69 KiB) Viewed 4631 times
zhan
Posts: 52
Joined: 16 Apr 2019, 13:31
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by zhan »

Hi, Have you done the step 4 before the X window starting ? I had come across the same problem. But after exporting the LANG and XMODIFIERS before X windows starting , I was able to use CTRL + Space to switch IMs
Simon
hikaru2001
Posts: 38
Joined: 18 Feb 2019, 04:13
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by hikaru2001 »

Hi Zhan,

Thank you for you help!
I do Step 4 in command line before startx, then it works. Now I can enter Chinese in the graphical interface.
And I have a new question:
Should I do Step 4 manually every time when I restart Revolution Pi?
Attachments
e.jpg
e.jpg (26.69 KiB) Viewed 4619 times
zhan
Posts: 52
Joined: 16 Apr 2019, 13:31
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by zhan »

Hi,
basically adding the commands to the correct startup scripts can approach your target.
till now I found that in /etc/default/locate the LANG and XMODIFIERS can be set
and in the ~/.config/autostart you might be able to find the location for scim -d.
Simon
hikaru2001
Posts: 38
Joined: 18 Feb 2019, 04:13
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by hikaru2001 »

Hi Zhan,

Your method works. And a little thing to be corrected:
"LANG and XMODIFIERS can be set in /etc/default/locale"
not "/etc/default/locate"

Thank you so much for you help :)
zhan
Posts: 52
Joined: 16 Apr 2019, 13:31
Answers: 0

Re: RevPi Core 3 with Chinese typewriting

Post by zhan »

thanks a lot for your correction :D
Simon
Post Reply