<p>You can install ibus and ibus-pinyin (there's also google pinyin but I personally prefer ibus-pinyin) or scim. Scim is more the historical software, but ibus is definitely better.</p>

<p>You will probably have to restart (!), but then there's about no configuration: at most, you learn the shortcuts to switch between input methods.</p>

CC BY-SA 3.0
2015-07-05T13:22:16.557Z
ibus does input pinyin tone marks, but at the same time I find ibus to be a big disappointment compared to pinyin IMEs on other platforms (but still a correct answer, so +1)
sqrtbottle
CC BY-SA 3.0
2015-07-05T22:55:59.373Z
I completely agree, Chinese input methods on Linux are really subpar, but that's simply because on the other side (Windows) some big companies invest dozens of engineers on having a good input method...
Still does the job and to me far preferable to using Windows :)
vermillon
CC BY-SA 3.0
2015-08-25T17:47:07.687Z
@vermillion 
Actually, my configuration on linux works better than anything I’ve ever seen in windows. I use fcitx. All one needs to do is read the manual...
Philipp
CC BY-SA 3.0
2015-08-25T17:51:54.690Z
@vermillon Also, (assuming you know German, since you’re in that stackexchange) I suggest you take a look at Neo keyboard layout if you’re willing to sacrifice some time learning a new keyboard layout. It has great linux support and is optimized to easily provide all the symbols usually needed by programmers. As a side effect, you can also easily type tone marks etc.
Philipp
CC BY-SA 3.0
2015-08-25T22:20:56.560Z
@Philipp , I didn't say I was unhappy with my experience of the keyboard, just the Chinese input that was not really great compared to the quality of predictions I've seen on the other side. When it comes to non-Chinese keyboard, I use my own config with the symbols of the languages I use.
vermillon
CC BY-SA 4.0
2020-07-06T20:33:27.003Z
I'm able to write chinese characters but not pinyin. Does ibus-pinyin or ibus-libpinyin let you type the pinyin?
Josie Thompson
CC BY-SA 3.0
2015-07-05T13:10:41.303Z
2015-07-05T13:10:41.303Z
vermillon
<p>As mentioned by vermillion, various IME's include this functionality. But there are other ways of doing this.</p>

<p>One way could be with a script similar to <a href="http://www.autohotkey.com/board/topic/65443-chinese-pinyin-entry/" rel="nofollow">this one for windows Autohotkey_L</a>. However, Autohotkey is not available for Gnu/Linux, so this would need to be reworked. A good text expansion app for Gnu/Linux is <a href="https://code.google.com/p/autokey/" rel="nofollow">AutoKey</a>.</p>

<p>I made <a href="https://gist.github.com/anonymous/2ff1bfe75a71583dfeef" rel="nofollow">an example</a> that can be imported to AutoKey. Since AutoKey supports auto capitalization with text expansion, i removed the case duplicates present in the above sample. Not tested extensively, but works-for-me (tm). I'm using Kubuntu 11.04 and installed the gtk version of AutoKey. From within AutoKey GUI, select File / Import to pull in this example.</p>

<p>Newer versions of AutoKey lack an import function. Import can be achieved by saving above example to /home/username/.config/autokey/autokey.json. Subsequently launching AutoKey results in import. Rename to avoid overwriting existing AutoKeys. Data from any compatible .json file will be merged with existing AutoKeys. Note that there are issues with AutoKey and Xubuntu 14.04.</p>

<p>Made an <a href="https://gist.github.com/anonymous/1b35822732436f9056ef" rel="nofollow">ibus-tables tone-marked pinyin entry method</a>. Because ibus chinese IME on my system doesn't allow for tone marked pinyin entry.</p>

<p>Finally figured out that one needs to install ibus-m17n to get access to tone based pinyin entry under Chinese layout (sudo apt-get install ibus-m17n). This is better than the ibus-tables approach as it doesn't have the annoying pop-up window while typing pinyin.</p>

<p>ibus-m17n zh-pinyin.mim handles this well. However, whenever you type a v it puts a ü. Other than that you can type normally in English and switch to pinyin just by adding numbers. So i <a href="https://gist.github.com/anonymous/8278bab2912ce5d776ff" rel="nofollow">changed it by adding a fifth tone</a>, the neutral tone. If v is typed, v is displayed. If u5 is typed (or u:) then ü is displayed. If you want this functionality, after backing up /usr/share/m17n/zh-pinyin.mim, place the above file in it's place and restart ibus.</p>

<p>Another approach, unfortunately restricted to working within LibreOffice or OpenOffice is to <a href="http://www.pinyinjoe.com/pinyin/pinyin_macro.htm" rel="nofollow">use a macro</a> (scroll down to OpenOffice subtitle). </p>

CC BY-SA 3.0
2015-08-25T16:22:33.307Z
2015-09-04T10:37:55.077Z
2015-09-04T10:37:55.077Z
fzzylogic
<p>Try this to see if it's helpful:</p>

<p><a href="https://eastasiastudent.net/china/mandarin/input-pinyin-tone-marks-ubuntu/" rel="nofollow">https://eastasiastudent.net/china/mandarin/input-pinyin-tone-marks-ubuntu/</a></p>

CC BY-SA 3.0
2015-07-04T01:58:48.300Z
2015-07-04T01:58:48.300Z
pjhades
<p>I'm working on <strong>Debian Wheezy Linux</strong>. I've seen some posts using pinyin tone marks. </p>

<ul>
<li>I was wondering if I can do that in Linux (Debian Wheezy). </li>
<li>How can I configure it?</li>
</ul>

CC BY-SA 3.0
2015-08-26T20:23:26.407Z
Now there's an [example AutoKey script](http://chinese.stackexchange.com/a/14801/11604) to do this.
fzzylogic
CC BY-SA 3.0
2015-08-28T07:58:45.207Z
You can input Chinese in linux after ibux or fctix  and a IME installed, but I suggest don't do that. These tools are very buggy. You will want to throw your machine to the window in 30 min,I have no doubt as a Chinese   linux user .
sfy
CC BY-SA 3.0
2015-08-31T10:19:23.677Z
Now there's an [ibus-tables template](http://chinese.stackexchange.com/a/14801/11604) to do this.
fzzylogic
<pinyin><software>
Can I type pinyin in Debian Linux?
# Can I type pinyin in Debian Linux?

(Asked by: username_0 on 2015-07-03)

I'm working on **Debian Wheezy Linux**. I've seen some posts using pinyin tone marks.

* I was wondering if I can do that in Linux (Debian Wheezy).
* How can I configure it?

**Tags:** pinyin, software
> **Comments:**
> **username_1**: Now there's an [example AutoKey script](http://chinese.stackexchange.com/a/14801/11604) to do this.  
> **username_2**: You can input Chinese in linux after ibux or fctix  and a IME installed, but I suggest don't do that. These tools are very buggy. You will want to throw your machine to the window in 30 min,I have no doubt as a Chinese   linux user .  
> **username_1**: Now there's an [ibus-tables template](http://chinese.stackexchange.com/a/14801/11604) to do this.  

---

## 3 answers

### Answer by username_3 on 2015-07-05. Score: 2 | Accepted answer

You can install ibus and ibus-pinyin (there's also google pinyin but I personally prefer ibus-pinyin) or scim. Scim is more the historical software, but ibus is definitely better.

You will probably have to restart (!), but then there's about no configuration: at most, you learn the shortcuts to switch between input methods.

> **Comments:**
> **username_4**: ibus does input pinyin tone marks, but at the same time I find ibus to be a big disappointment compared to pinyin IMEs on other platforms (but still a correct answer, so +1)  
> **username_3**: I completely agree, Chinese input methods on Linux are really subpar, but that's simply because on the other side (Windows) some big companies invest dozens of engineers on having a good input method... Still does the job and to me far preferable to using Windows :)  
> **username_5**: @vermillion  Actually, my configuration on linux works better than anything I’ve ever seen in windows. I use fcitx. All one needs to do is read the manual...  
> **username_5**: @vermillon Also, (assuming you know German, since you’re in that stackexchange) I suggest you take a look at Neo keyboard layout if you’re willing to sacrifice some time learning a new keyboard layout. It has great linux support and is optimized to easily provide all the symbols usually needed by programmers. As a side effect, you can also easily type tone marks etc.  
> **username_3**: @Philipp , I didn't say I was unhappy with my experience of the keyboard, just the Chinese input that was not really great compared to the quality of predictions I've seen on the other side. When it comes to non-Chinese keyboard, I use my own config with the symbols of the languages I use.  
> **username_6**: I'm able to write chinese characters but not pinyin. Does ibus-pinyin or ibus-libpinyin let you type the pinyin?  

---

### Answer by username_1 on 2015-08-25. Score: 1

As mentioned by vermillion, various IME's include this functionality. But there are other ways of doing this.

One way could be with a script similar to [this one for windows Autohotkey\_L](http://www.autohotkey.com/board/topic/65443-chinese-pinyin-entry/). However, Autohotkey is not available for Gnu/Linux, so this would need to be reworked. A good text expansion app for Gnu/Linux is [AutoKey](https://code.google.com/p/autokey/).

I made [an example](https://gist.github.com/anonymous/2ff1bfe75a71583dfeef) that can be imported to AutoKey. Since AutoKey supports auto capitalization with text expansion, i removed the case duplicates present in the above sample. Not tested extensively, but works-for-me (tm). I'm using Kubuntu 11.04 and installed the gtk version of AutoKey. From within AutoKey GUI, select File / Import to pull in this example.

Newer versions of AutoKey lack an import function. Import can be achieved by saving above example to /home/username/.config/autokey/autokey.json. Subsequently launching AutoKey results in import. Rename to avoid overwriting existing AutoKeys. Data from any compatible .json file will be merged with existing AutoKeys. Note that there are issues with AutoKey and Xubuntu 14.04.

Made an [ibus-tables tone-marked pinyin entry method](https://gist.github.com/anonymous/1b35822732436f9056ef). Because ibus chinese IME on my system doesn't allow for tone marked pinyin entry.

Finally figured out that one needs to install ibus-m17n to get access to tone based pinyin entry under Chinese layout (sudo apt-get install ibus-m17n). This is better than the ibus-tables approach as it doesn't have the annoying pop-up window while typing pinyin.

ibus-m17n zh-pinyin.mim handles this well. However, whenever you type a v it puts a ü. Other than that you can type normally in English and switch to pinyin just by adding numbers. So i [changed it by adding a fifth tone](https://gist.github.com/anonymous/8278bab2912ce5d776ff), the neutral tone. If v is typed, v is displayed. If u5 is typed (or u:) then ü is displayed. If you want this functionality, after backing up /usr/share/m17n/zh-pinyin.mim, place the above file in it's place and restart ibus.

Another approach, unfortunately restricted to working within LibreOffice or OpenOffice is to [use a macro](http://www.pinyinjoe.com/pinyin/pinyin_macro.htm) (scroll down to OpenOffice subtitle).


---

### Answer by username_7 on 2015-07-04. Score: 0

Try this to see if it's helpful:

<https://eastasiastudent.net/china/mandarin/input-pinyin-tone-marks-ubuntu/>


---

