ShinChven's Blog

在 Ubuntu 上使用 ibus-rime 在 vscode 中无法输入中文的问题

Thu Aug 12 2021

我在Snap Store中安装了vscode,但是发现无法使用ibus-rime进行中文输入。

Google 了一会儿以后,看到有 blog post 提到从Snap Store中安装的vscode确实存在无法输入中文的问题,通过微软源apt中安装可以解决这个问题。

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt install apt-transport-https
sudo apt update
sudo apt install code # or code-insiders


$ sudo apt install code
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 78.1 MB of archives.
After this operation, 296 MB of additional disk space will be used.
Get:1 https://packages.microsoft.com/repos/code stable/main amd64 code amd64 1.59.0-1628120042 [78.1 MB]
Fetched 61.6 MB in 2min 49s (364 kB/s)                                         
Selecting previously unselected package code.
(Reading database ... 218411 files and directories currently installed.)
Preparing to unpack .../code_1.59.0-1628120042_amd64.deb ...
Unpacking code (1.59.0-1628120042) ...
Setting up code (1.59.0-1628120042) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for shared-mime-info (1.15-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...