Use RTL8192SE wireless card in Gentoo with kernel 3

Although I had solve this problem earlier, I forgot the solution when I built a new system today. The configuration in kernel’s menuconfig is:

Symbol: RTL8192SE [=m]
Type  : tristate
Prompt: Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter
Defined at drivers/net/wireless/rtlwifi/Kconfig:13
Depends on: NETDEVICES [=y] && WLAN [=y] && MAC80211 [=m] && EXPERIMENTAL [=y]
-> Device Drivers
-> Network device support (NETDEVICES [=y])
-> Wireless LAN (WLAN [=y])
Selects: FW_LOADER [=y] && RTLWIFI [=m]

But after reboot, it still not loaded. Via dmesg, it caused by firmware missing. There’s a package named rtl8192se-firmware in portage tree but it is NOT the one we need. What we need to do is to:
# emerge linux-firmware.
After this step, it works. 🙂

Use PHP 5.3 and Lighttpd on CentOS 5

The default packages built-in my CentOS box are Apache HTTP Server 2.2 and PHP 5.1. If we want to replace them with Lighttpd and PHP 5.3, we need some modification to the system. This post is an annotation of the procedure.

1. The Lighttpd package is not provided by official repository. We need to add the support via EPEL x86_64 repository (I’m using 64-bit CentOS): # rpm -Uvh

2. After update, we can install lighttpd: # yum install lighttpd lighttpd-fastcgi

3. Update PHP from 5.1 to 5.3, first we need to list all installed 5.1 packages: # rpm -qa | grep php and then to remove them all.

4. Install the PHP53 and related packages we need: # yum install php php-cli php-mysql.
Note: The PHP53 packages also install httpd packages which we cannot removed individually.

5. Enable fastcgi support for Lighttpd in /etc/lighttpd/lighttpd.conf as this reference: lighttpd + FastCGI in CentOS.
Note: The cgi.fix_pathinfo=1 configure is installed by default in /etc/php.d/lighttpd.ini and we can skip to set it up.

6. Finally, the most important step for some application use sessions. We need to set up the permissions by: # chown -R root:lighttpd /var/lib/php because the web server we use is not httpd. If we do not set this, some application like phpMyAdmin we raise error while login.

7. Restart the Lighttpd and enjoy it. 🙂

Use GCIN and gnome-shell on Gentoo

Despite the common usage of input method is iBus, GCIN is still my favorite one for Chinese. But with the upgrading of GNOME 3 (gtk3) and in Gentoo, there are notes should be wrote down.

1. The GCIN package is not provided officially by Gentoo’s portage tree. But with hard works of gentoo communities in gentoo-zh (from gentoo-taiwan and gentoo-china), we can use GCIN via layman:

# layman -L
# layman -a gentoo-zh

2. Add gtk3 use flag for GCIN in /etc/portage/package.use:
# echo 'app-i18n/gcin gtk3' > /etc/portage/package.use
3. Some note to make GCIN works is listing in Linux/X window gcin 無法使用的檢查事項.For example:
a) My own configuration for environment variable declare is in ~/.xprofile:

export GTK_IM_MODULE=gcin
export QT_IM_MODULE=gcin
export XMODIFIERS=@im=gcin

b) To install GCIN’s module in gtk2/3 on x86 (i686) Gentoo OS:

# gtk-query-immodules-2.0 > /etc/gtk-2.0/i686-pc-linux-gnu/gtk.immodules
# gtk-query-immodules-3.0 --update-cache

[20120209 edit]
The latest version since 2.7.1 disable the En input method (IM) for switching by default. And for my newly installed gentoo box, I cannot switch IM if the default method is set as En.

It is not convenient when I set other IMs as default, because I need to change to En by pressing an additional shift key or ctrl-space hotkey.

Help from GCIN forum by coolcd, the solution is to close the default attribute after IM launch. The setting is to un-check the box in gcin-tools for:

Default input method and toggle key > Toggle on input mode by default (non-XIM only)

After restart GCIN, the IM mode by default is En that like most IME done.

Enjoy it. 🙂

Tab switching order of Firefox

As introduced in Firefox 3.6, the function of tab switching order via CTRL-TAB shortcut improved. I did not try the functions because I’ve installed the plug-in: Ctrl-Tab and it works through lots of Firefox version upgrading. But in recent days, with the Firefox 10 release and I do some profile clean up, the plug-in malfunctioned. With trying lots of plug-ins, I cannot find a LIGHT-WEIGHT and SIMPLE one just like the Ctrl-Tab. And I have no idea why it didn’t work from now on. So I turn to try the built-in functions in Firefox (ported from the Ctrl-Tab plug-in?).

The reference is here: Ctrl Tab Preview Feature in Firefox 3.6 Explained with screen-shots to explain how it works, just like the pluig-in. The procedure to enable most-recently-used tab switching order:
1. Type about:config in address bar and press ENTER
2. Click I’ll be careful, I promise! in the notification
3. Search for browser.ctrlTab.previews and double click the entry to set it as true
4. Finish and enjoy it. 🙂




這次選的科目是 Programming Language and Compiler (PLC),是說比起 Theory of Complexity (TC) 應該也是沒有輕鬆到哪去就是。

只是說如果是在碩士剛畢業的時候,我應該會選擇考 TC 吧,因為這些題目看起來跟當初中山的 Algorithm 資格考很類似。

不過開始讀 PLC 才發現當初 Compiler 真的沒學好,好多東西現在才大致看得懂當初是在說什麼,像是 LL(1) LR(0) SLR(1) LALR 等等。


Clean up, merge posts and add tags

It seems some posts in my blog should do clean up and merge for the title, slug or contents. Because posts here are moving several times(no matter the version of wordpress or system environment of sits).

On the other hand, they must be added relative tags for searching and convenience reading. I’ll do this when I’m free.

Time to leave and upgrade?

Seems it’s time to move out this machine from somewhere to another side. Maybe the VPS is a good choice.

It’s time to survey a feasible VPS (in which the C/P better) and a newer domain now…