Posts in category “Linux”

解决 ibus-rime 在 ubuntu 18.04 下中英文切换图标无变化问题

我忍受这个问题已经有快一个月了,今天打算花点时间把它解决掉。

经过一翻搜索,我发现已经有人在 ibus-rime 项目上报告了这个问题,也有人给出了解决方法。遗憾的是,那个解决方案有些含糊,我不知道需要对系统做哪些改变。

也许从源码安装能够解决问题?但我一开始走了弯路,没有认真安装文档中提到的所有依赖,毫无疑问的,编译到中间就因为缺这缺那失败了。后面我就老老实实的按照文档说明,先安装好所有的依赖,再执行 ./install.sh。然而我仍然可耻的失败了。我不知道原因....也许应该报个bug给作者。幸运的是,源码里还有一个 install-static.sh 脚本,我执行了这个脚本,结果顺利编译成功并安装。

现在我的五笔拼音也能够识别中英方式了(英文状态显示A,中文状态显示“五”),太开心了!

我是 ubuntu 18.04 (pop!os) Gnome 3 桌面,五笔拼音输入法

为方便同样用 ubuntu 18.04 的同学,我把编译前的准备工作和编译步骤列在下面:

1. 准备工作

sudo apt install cmake libboost-all-dev libibus-1.0-dev libnotify-dev libgoogle-glog-dev \
libkyotocabinet-dev libleveldb-dev libmarisa-dev libopencc-dev libyaml-cpp-dev

2. clone project and submodules:

git clone --recursive https://github.com/rime/ibus-rime.git
cd ibus-rime
# do this as normal user
./install-static.sh

3. 重启 ibus

ibus-damon -dxr 

Enjoy your favorite input method!

My favorite applications on Ubuntu

Awesome-Linux-Software
Awesome-Linux-Software Chinese

Currently, my laptop runs Pop! OS 18.04 (Ubuntu). Thanks my boss, he bought me a Windows laptop, so I have the chance to run Linux as my main OS. The following is a list of my favorite apps on my laptop.

mp3 player: Audacious

browser: Chromium

Markdown editor: Typora

Text editor: Geany

Quick view: gnome-sushi

Epub reader: Foliate

Console Dictionary: sdcv

Console tts: say (in gnustep-gui-runtime package)

hardware information: inxi

say alternative: gnustep-gui-runtime

apt-get install -y audacious chromium typora geany gnome-sushi foliate sdcv gnustep-gui-runtime inxi

3rd software

Jetbrains: Rider, Webstorm, Phpstorm, Pycharm

Telegram-desktop

will update the list when I remember... 😀

gnome3 how to alt tab windows on current workspace only?

gsettings set org.gnome.shell.app-switcher current-workspace-only true

Virtualbox MacOS VM setup / setup Rime/Squirrel input method (鼠须管) on macOS

  1. I successfully ran macOS High Sierra on my Ubuntu 18.04 laptop through VirtualBox. VirtualBox is great ! This article helps!
  2. Install Rime on macOS in five minutes
  3. download the zip file from latest release from the Tags page on GitHUB
  4. unzip the file and install the pkg file
  5. go to https://github.com/rime/plum to get the wubi package.
git clone https://github.com/rime/plum.git
cd plum
bash rime-install wubi pinyin-simp

The last step, is creating a default.custom.yaml file and putting it in ~/Library/Rime directory.

the content in my default.custom.yaml is

patch:
  schema_list:
    - schema: wubi_pinyin
    - schema: pinyin_simp

How make openvpn work with docker & avoid entering the password every time

I met this issue today morning and find the solution from the link I just refered.

I have made a few change to the solution to meet my case, this is why I wrote this article.

My version of fix-routes.sh

#!/bin/sh
echo "Adding custom route to $route_vpn_gateway with /24 mask..."
# ip route add 10.8.0.0/24 via $route_vpn_gateway
ip route add 192.168.178.0/24 via $route_vpn_gateway

echo "Removing /1 routes..."
ip route del 0.0.0.0/1 via $route_vpn_gateway
ip route del 128.0.0.0/1 via $route_vpn_gateway

I didn't use ip route add default via $route_vpn_gateway line because I didn't want to route everything through my VPN.

Changes to my openvpn profile

You can see I added an extra askpass line besides what the author has done. That line was added to help me get ride of the annoyance of entering the password for my private key every time I run the openvpn client program.

auth SHA256
auth-nocache
verb 3
askpass /home/davidwei/ovpn/pass.txt
script-security 2
route-up /etc/openvpn/fix-routes.sh

My ovpn start one-line script

davidwei@xps:~$ cat ~/bin/ovpn 
sudo openvpn ~/shukebeta.ovpn > /dev/null 2>&1 &

My pass.txt

davidwei@xps:~$ cat ~/ovpn/pass.txt 
my-very-secret-password