Setup VcXsrv as X11 Environment

Follow emacs-wsl’s README to install VcXsrv as X11 Environment.

Environment Variables Configure

export DISPLAY=:0.0
# for hidpi

After the installation, run start "" "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -multiwindow -clipboard -wgl in Command Prompt (Not powershell) to start VcXsrv.

Compile & Install Emacs 28

According to the install instructions of emacs-rime, Emacs’s version needs higher than 26.1 to support dynamic modules. However, OpenSUSE 15.3 only has Emacs 25.3, and we can’t use snap in WSL 1, so we need to compile one from the source code.

Compile Emacs (Install locally)

# Download emacs 28.0.90
$ wget
# Install
$ sudo zypper source-install --build-deps-only emacs
$ tar xf emacs-28.0.90.tar.gz && cd emacs-emacs-28.0.90
$ mkdir -p ~/usr/emacs28
$ ./configure --with-x-toolkit=gtk --with-cairo --prefix=$HOME/usr/emacs28
$ make -j<cpu_nums>
$ make install



;; set font for emoji
(setq use-default-font-for-symbols nil)
(set-fontset-font t 'symbol "Noto Color Emoji")
;; set font for Chinese & Japanese
(set-fontset-font t 'han "Noto Sans SC")
(set-fontset-font t 'kana "Noto Sans JP")

According to this post on reddit, due to a bug on OpenSUSE, maybe we need

/usr/share/X11/app-defaults/Emacs manually: prefixing the line Emacs.FontBackend: xft,x with !!

to avoid the issue.

Compile & Install emacs-rime

Compile & Install librime for emacs-rime

# install compile dependencies
$ zypper install cmake emacs-el gnutls libgnutls-devel libboost_* glog-devel leveldb-devel libmarisa libcapnp-devel libopencc2 gtest
$ cd ~/.emacs.d && git clone --recursive
$ cd librime && make

❗️️: To avoid pthread error cover the real error while compiling in multi-threads, it’s better to compile in single core at first time. Or it may cost more time to find the real error.

make install to install globaly or set up rime-librime-root in .emacs :

(use-package rime
  (rime-librime-root "~/.emacs.d/librime/build"))

Install emacs-rime

Follow the instruction in emacs-rime’s doc.

Set up Default Schema

Using default configure from rime-prelude:

$ git clone
$ cd rime-prelue/*.yaml ~/.emacs.d/rime

At this time, if the configure is correct, M-x rime should trigger the input method.

Configure Candidate Menu (optional)

And we need to install posframe if we want to add a candidate menu that follows the cursor (just like the showcase):


(require 'posframe)
(setq default-input-method "rime"
      rime-show-candidate 'posframe)

Configure Menu Keybinding


(use-package rime
  (:map rime-mode-map
   ("C-`" . 'rime-send-keybinding)))


If configured successfully, press C-` will show configure menu.

Install cloverpinyin (optional)

cloverpinyin provides a better input scheme and has a better corpus. Using this scheme give me a better experience like other commercial input methods.

Download the release and decompress into the rime’s schema folder:

$ cd ~/.emacs.d/rime/ && wget
$ unzip

Final .emacs Configure

(require 'posframe)
(require 'rime)
(setq default-input-method "rime"
      rime-show-candidate 'posframe)
(setq rime-posframe-properties
 (list :font "Noto Sans SC Regular"
       :internal-border-width 10))
(setq rime-share-data-dir "/home/flandre/.emacs.d/rime")
(use-package rime
  (default-input-method "rime")
  (:map rime-mode-map
   ("C-`" . 'rime-send-keybinding)))




  • I tried to use stow for multiple Emacs versions, but it’s not a good practice to maintain multiple package versions. And I didn’t find other tools like Checkinstall or update-alternatives on OpenSUSE, so I just installed locally and set $PATH.