Linux Mint Debian (LMDE) fcitx 安装后无法调出中文输入法的问题   Leave a comment

根據各種介紹 在LMDE 上安裝sogou 以及其他輸入法,但是總是無法調出。


 fcitx-frontend-* 後似乎可以輸入中文了。

在沒有安裝之前,firefox  chrome 都無法輸入中文,但是其他 GTK 2 的似乎都可以輸入中文。

貌似這個問題是   fcitx-frontend-* 引起的。

Posted August 15, 2014 by wzhenhua in GNU Linux

Install Fcitx — Chinese input– on Calculate Linux (a Gentoo Linux based distribution)   Leave a comment

After playing around with some Arch Linux based distributions in last a few years , I switched back to Calculate Linux recently. The Calculate  Linux is a Gentoo based Linux distribution.


In the most cases, I work under English mode. However, I have to type Chinese in many other cases. Therefore, I still have to install a Chinese Input.  Sogou input for Linux is becoming very popular these days, but it looks like that it has not been ported to Gentoo Linux. So Fcitx is still my first choice.  By the way, Sogou for Linux is based on Fcitx.


Under Calculate Linux, it is easy to insally Fcitx, just

# emerge -av fcitx

In order to config input methods and input Chinese, I also install configure tool and one preferred Chinese pinyin

#emerge -av fcitx-configtool fcitx-sunpinyin


You also need to add the following to ~/.xprofile

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=”@im=fcitx”


If the file does not exist, just create one.


Save the file, reboot the X. You should be good to go.


Posted June 28, 2014 by wzhenhua in GNU Linux

Notes: Arch Linux (ArchBang Linux) on Clevo x7200 with ATI 6990   Leave a comment

Some notes on the configuration of Arch Linux (ArchBang)

  1. x7200 is coming with an ATI 6990 video card. The default installation of ArchBang just works out of box. The video driver is the opensource version. But I don’t like it, so install the AMD Catalyst instead.
  2. There is a long story and several different ways to install Catalyst, I follow next several steps:
  • In AUR, people already put the latest AMD Catalyst testing version there. So the first step is to make sure AUR is working. In the default insallation of ArchBang, the AUX is not installed. What I did is as follows:
  • Install yaourt:
  • Un-comment the [multilib] repo in “/etc/pacman.conf” for 32-bit lib/application support.
  • Put the following at the end of “/etc/pacman.conf”

SigLevel = Never
Server =$arch

  • run the following to install yaourt and Catalyst

sudo pacman -Syu
sudo pacman -S yaourt

sudo pacman -S base-devel linux-headers
sudo pacman -S qt4 acpid acpi lib32-libxext lib32-libdrm
sudo yaourt catalyst-test
sudo systemctl enable atieventsd
sudo systemctl start atieventsd
sudo systemctl enable catalyst-hook
sudo systemctl start catalyst-hook
sudo systemctl enable temp-links-catalyst
sudo systemctl start temp-links-catalyst
sudo aticonfig --initial

Posted March 28, 2014 by wzhenhua in GNU Linux

Clevo x7200 audio under GNU Linux   Leave a comment

For Clevo x7200, the audio under GNU Linux, such as Ubuntu and other Debian based system, does not work by default.

It works for some models.
acer-aspire-4930g,acer-aspire-6530g, acer-aspire-7730g, acer-aspire-8930g, medion, intel-x58(but sound cursor on the keyboard do not work) and auto(no surround). I think the best is medion. 

Posted March 26, 2014 by wzhenhua in GNU Linux

VIM: How to comment latex in multiple lines   Leave a comment

If you want to comment paragraph in a latex file in vim/gvim or any derivation, such as Macvim… do as follows,


% go to the beginning of the line

% visual mode

arrow keys up/down
% move up and down to select the line to be commented

I (shift+i)
% NOT sure why, but need this step

% % shows on the first line
% comments done

Posted July 29, 2013 by wzhenhua in GNU Linux, LaTeX, MAC & OS X

One way to solve the error message of Gnuplot-4.4.3 for Mac OS X   Leave a comment

The dmg version of gnuplot we can find on internet is gnuplot-4.4.3-aqua-i386.dmg. This is included in octave-3.4.0-i386.dmg, in the folder of Extras/ . However, after moving the gnuplot into the application folder, gnuplot does not run correctly. There is error message on the screen.

One way to solve the problem is as follows,

Open a terminal, and go to


and replace every instance of




In vim, you can do this with the following command:


Try gnuplot again, it should work fine this time.

Posted June 23, 2013 by wzhenhua in GNU Linux, MAC & OS X

Use utopia font in LaTeX   Leave a comment

If you want to try utopia font in your paper, you can put the following at the beginning of your tex file.

\usepackage[utopia]{mathdesign} % Change the fonts of all the paper

It looks like this
Screen Shot 2013-04-17 at 10.08.45 PM

Posted April 17, 2013 by wzhenhua in LaTeX

How to build your own workstation   3 comments

I GOOGLE around the world and try to find some introductions about how to build you own workstation. But nothing I need. So I decide to write something here…

First, what is workstation here?  According to WIKI, 

A workstation is a high-end microcomputer designed for technical or scientific applications.

So, the workstation here is just a computer with some software. One feature is that the computer, no matter a laptop or a desktop, should be powerful. Basically, powerful means high-end CPU, dedicated video card, huge memory, fast and huge hard disk…


Based on my experience. I build my workstation on an Alienware M17x R2. It is not necessary to be this model. Actually it is far more than powerful. You have many other almost equivalent alternatives. I am going to give an incomplete list here:

Alienware series is a very good choice, but not cheap. I am sure you can find some cheap but good ones on eBay. M18x R2 is huge but should be powerful. M17x R3 is good, not as good as M17x R2, but Okay for a workstation. M14x R2, maybe a good candidate for a real workstation.

Precision series is also very good; although not as shine as Alienware, but it is powerful enough.

The dreamcolor series is awesome, especially the Elitebook w series, such as 8760w, 8560w

The W series should be good.

Theses brands, all based on Clevo, are even more powerful than Alienware.

My strategy is to purchase one manufacturer refurbished from Dell outlet or an almost new one from eBay. This will save lots of money for you. The one I got is M17x R2 with

i7 920xm + 8gb 1066 Memory + 1x ATI 4870 + one normal 7200 HD (I forget the size and brand)

This cost me $1050 in 2011.

After the purchase, I got a sata II 128 SSD by $120. I am using GNU Linux, it does not support ATI video card very well, so I sold the ATI 4870 and changed to a 285m gtx, this did not cost me anything.

So the cost of hardware is 1050+120=1170$


Now let us go to the software. This is more important than the hardware part. Because powerful hardware without decent software is almost nothing.

I do not play game too much. In most case, I use computer to write paper, read paper, do some scientific computation, edit pictures and videos… So for scientific research, I choose GNU Linux. Some researchers choose Macbook pro. It is also a good choice, but not as powerful as PC, and more importantly, you can not do too much to configure the hardware. One advantage of Macbook Pro is that the OS X runs very well with Macbook pro, very stable.

There are tons of GNU Linux distribution in the world. The most popular one is Ubuntu, its own Unity windows manager is also very cool, not perfect, but good enough for daily work. Many scientific researchers and programmers choose this one. If you like you can follow them, easy to install and maintain.

For my personal preference, I choose the Gentoo based Calculate Linux. It is developed and maintained by a Russian group. The current version is Calculate Linux 13. I tried two different versions, one is CLS, which represents Calculate Linux Scratch; and the other is CLDG, which represents Calculate Linux Desktop GNOME. If you want to build you own system from scratch, choose CLS, otherwise choose CLDG or other versions. Check Calculate Linux website for detail.

The reason of choosing this Gentoo based Calculate Linux is as follows,

1) Gentoo Linux is a rolling system and Calculate is almost 100% compatible with Gentoo.

Sabayon Linux team also announces that they are 100% compatible with Gentoo. However based on my experience, I never successfully emerge -auDN world under sabayon. I guess the two portages are never compatible with each other. But for Calculate Linux, it always works, no pain at all.

2) Rolling system means that once you install it on the machine, you do not need to re-install the system to keep it up to date. Unlike other distributions, such as Ubuntu, you need to re-install the new version if you want to keep up to date.

3) Gentoo is source based. This means that the system will run in a very efficient way if you compile software according to your hardware. Actually you can choose the USE parameter to max the performance of the machine.

Install Calculate Linux

To install Calculate Linux, first you need to burn the ISO to a DVD or CD, depending on which version you want to install. If you choose CLS, which is less than 700M right now, you could fit it in a CD, for other versions, you might need to choose a DVD. Personally, I choose to install it from a USB flash driver. Because this will be much faster then the CD or DVD in the installation.

dd if=cldg-13-x86_64.iso of=/dev/sdX bs=4M

You need to change cldg-13-x86_64.iso to the iso you have, sdX is your USB driver.

After that, keep the USB driver connected to your computer, reboot and make sure it boots from USB driver first. Usually it can be changed in the BIOS setting. In my case for M17x R2, I press F12, it goes to the menu of booting choice. Wait for a while, you will see the interface of installation. Choose the first one, wait for a while. If everything goes well, you will see the graphic interface, in my case, the Gnome shows up. If you use CLS, you will not see the graphic interface, but the text mode with framebuffer.

Today, Feb 14 2013, something bad happens. I try to emerge -auDN world, but several gnome packages blocke the updating process. I checked the Calculate Linux community, it looks that they are also get stuck with gnome3. They suggest to use Xfce version. Therefore, I plan to switch back to CLS and block gnome software by USE=”-gnome” or try Calculate linux with Xfce.

After trying out the Calculate Linux with Xfce, I think I find the new operating system I am going to use from now on.

There will be a new post to discuss how to install Calculate Linux Xfce. In the next step, I suppose you already get the system running and we only need to choose some software.

To be continued…

Posted February 11, 2013 by wzhenhua in GNU Linux

Change fonts of GTK2 software, based on Calculate Linux (Gentoo based)   Leave a comment

Gtk 2 fonts can be manipulated by gnome, but it does work under other WM, such as Fluxbox… One way to change the font is to modify


I change the original font to Courier New Bold, then everything works.

Posted February 9, 2013 by wzhenhua in GNU Linux

How to change the default application of Gnome under Linux (Based on Calculate/Gentoo) e.g., latexila   Leave a comment

If you want to change the default GTK programs, you can do something similar as below.

I am using Calculate Linux, a Gentoo based rolling distribution. After lunching the latexila, a pretty good LaTeX IDE, I find that the gimp will open the pdf when you try to preview the PDF file. To change the gimp to evince. I do the following changes:

1: $ xdg-mime query default application/pdf

This will show current application of PDF, if it is not evince, do the following:

2: $ xdg-mime default evince.desktop application/pdf

Try pdf preview under latexila again, you should see evince now.

Posted February 4, 2013 by wzhenhua in GNU Linux, LaTeX