Archive for the ‘Linux’ Category

How to set up fcitx under FC7 with en_US.utf-8 locale

Friday, October 12th, 2007

First, you can download the source tarball and use the regular configure, make and make install procedure to install it.

Then create a new input method entry: /etc/X11/xinit/xinput.d/fcitx.conf, with the content:

XIM=fcitx

XIM_PROGRAM=fcitx

GTK_IM_MODULE=fcitx

QT_IM_MODULE=fcitx

Create and set up alternatives using fcitx

alternatives --install /etc/X11/xinit/xinputrc
 xinputrc /etc/X11/xinit/xinput.d/fcitx.conf 100

alternatives --config xinputrc

Now, fcitx should be good to use under zh_CN locale. If you want to use under en_US locale, do the following as well.

Edit /etc/X11/xinit/xinitrc.d/xinput.sh, add “en” to the “_language_list” string.

Edit /etc/gtk-2.0/x86_64-redhat-linux-gnu/gtk-immodules, add “en” to “xim” section.

Share

fix ati flgrx 8.40.4 signal 11 problem on FC7 x86_64

Friday, October 12th, 2007
cd /usr/lib64/xorg/modules/drivers/

mv fglrx_drv.so fglrx_drv.so.orig

cat fglrx.drv.orig
| sed "s/xe8x61x2cxfexff/x90x90x90x90x90/g"
> fglrx_drv.so

aticonfig --initial
Share

How to set up a DNS server for your home office

Monday, September 24th, 2007

A home office DNS server basically is a full feature DNS server with two specials:

  • It resolve the local domain name which is only used internally, pretty much like: main.home and bedroom.home.
  • For the public domain name, it prefer to be just as a forwarder of your ISP’s DNS.

First, you will install the DNS server software. It is quite easy on Fedora:

yum install bind
yum install bind-chroot
/sbin/chkconfig named on
/sbin/service named start

Then, create a DNS config file under /var/named/chroot/etc :

options {
    directory "/var/named";
    query-source address * port 53;
    allow-query { localnets; };
    forward first;
    forwarders {
        // put your ISP's DNS here.
        // the forward DNS of your router won't work
	64.70.22.12;
    };
};

include "/etc/named.rfc1912.zones";

zone "home" {
    type master;
    file "home.zone";
};

zone "6.168.192.in-addr.arpa" {
    type master;
    file "6.168.192.in-addr.zone";
};

include "/etc/rndc.key";

Then, you will create your local .home domain zone file and its reverse resolve file under /var/named/chroot/var/named.

I give my example here, the main.home (192.168.6.20) is the DNS server of local network, the jeff.home (192.168.6.33) is the work station.

home.zone:

$TTL	3600
$ORIGIN	home.

home.	IN SOA	main root (
	20070924	; Serial
	10800		; Refresh
	3600		; Retry
	604800		; Expire
	86400 )		; Minimum TTL

@	IN NS	main

main	IN A	192.168.6.20
jeff	IN A	192.168.6.33
@	IN A	192.168.6.20

6.168.192.in-addr.zone:

$TTL	3600

6.168.192.in-addr.arpa. IN SOA	main.home root (
	20070924	; Serial
	10800		; Refresh
	3600		; Retry
	604800		; Expire
	86400 )		; Minimum TTL

@	IN NS	main.home.

20	IN PTR	main.home.
33	IN PTR	jeff.home.
Share

Solution for web pages stop loading in the middle

Sunday, August 26th, 2007

After upgrade my Linux box to Fedora 7, I found that some web pages will stop loading in the middle. This renders a page only with header or even an empty page. With Wireshark, I can see only one package returned by the server, the rests are lost.

At first, I suspected this is a MTU problem, but with no luck after trying hundreds MTU settings. Finally, I remembered some notes I have took before about Linux’s TCP fix, and it did the magic.

Here is the settings in /etc/sysctl.conf

net.ipv4.tcp_moderate_rcvbuf = 0
net.ipv4.tcp_window_scaling = 0

Also, it is not a bad idea to turn off ipv6 support, add a file includes following to /etc/modproble.d/

alias net-pf-10 off
alias ipv6 off
Share