2010年6月7日 星期一

Add font without root in linux

My job is software development in Linux. Our company provide many servers for development. Of curse, I don't have root permission. But I want some great font for coding and that really help a lot. So I try to use font in my terminal without root permission.

Step:
1.put font file into .fonts in your home directory
2.run "fc-chace" update font cache. And you can check the font list with "fc-list"
3.set your application such gvim or terminal to the font you add.
That's all.

Linux Tutorial: Linux Fonts have detail information about fonts in linux.

2010年6月5日 星期六

Manul build Atheros AR8151 for ArchLinux

Well... This also take me couple hours. It shouldn't' be. So I need to note it for myself.

First, there is not build-in support for atheros AR8151 ethernet chip in archlinux. You need to build it by yourself.

2.extract tar ball to somewhere.
3.make sure you have related package like gcc, make, kernel header.
4.The driver from atheros default take /lib/modules/$(BUILD_KERNEL)/build for kernel header and I change to /usr/src/linux-$(BUILD_KERNEL) by change the order of KSP variable in src/Makefile
5.Refer to readme file in tar ball, I found I don't have version.h in header path and do "make include/linux/version.h" in linux source tree.
6.I use kernel 2.6.33 and it seems have a change which not use utsrelease.h file. But the driver makefile need it. I manually add a utsrelease.h in /usr/src/$(KERNEL_VERSION)/include/linux with content "#define UTS_RELEASE 2.6.33-ARCH"
7.build driver with "make" and "make install" to install it (don't forget install as root)
8.You should get a driver as kernel module in /lib/modules//kernel/drivers/net/atl1e/atl1e.ko. The readme file of tar ball show it as arl1e.ko but I get alt1e.ko. I don't know why but it don't matter. It's the driver for AS8151.
9.load the driver by "modprobe atl1e" and check it with "lsmod | grep atl1e"
10.Finish to build driver. You can test it by "ifconfig ethx

Then the AR5181 ethernet chip works. And don't forget to add it to MODULE of /etc/rc.conf or config modprobe for next boot.

archlinux and kdemod

I try to change to use ArchLinux. Documents of ArchLinx web are very helpful. I just follow the instruction and install it in my new laptop. Well...Almost. Actually I have problem in start kdemode. It told "kstartupconfig4 miss or fail......" and the result I google for it is that's related to gcc version. But I had installed newest gcc and it still have problem. If you are looking for step by step instruction, go to ArchLiux's website.

I give up to install kdemod and remove it in the end. But I found the pacman package system is very impressive. I note that the disk size usage before install and after remove are almost the same. That means pacman did remove kdemod and its dependency package clearly. Again, It's very impressive.

But the ArchLinux default deriver for my atheros AR928x seems have same problem with unbuntu 10.04. The network speed is terrible and I have no such problem in windows 7. It take almost two hours to download kdemod and I don't want do it again. I don't know how to fix it yet. But I was tired with it.

So I use awesome now and it just works fine. I will install kde (kdemod? No. Thanks.) after I fix network issue. Now... Time to bed.

[update 2010/06/07]
I don't know why the network interface doesn't slow after I install kde although I know it's not related to kde. Anyway, ArchLinux is very impressive and I like it. GoodBye~ Ubuntu.