My words on free/open source software
Tuesday, July 22, 2008
My Home Storage Reached 2 TB
Today I bought and installed a 750GB hard drive to my backup server. This made my total storage at home reached 2.11 TB. The usable storage is more than 500 GB (others are used for backup).
Thursday, July 03, 2008
OpenStreetMap is an Interesting Project
www.openstreetmap.org is an really interesting project, I've been contributing to it for some time, mainly covers Beijing urban and rural area.
Sunday, June 29, 2008
My HD High Load/unload Cycle Problem Fix
I've just applied http://en.opensuse.org/Disk_Power_Management to fix the high load/unload cycle problem of my IBM ThinkPad T43p laptop. My Load_Cycle_Count grows at around 30 per hour, which is not very high, but theoratically limit my HD's life to around 4 years.
PS. though I dislike SuSE due to their pact with Microsoft, they are doing really well in some fields. The article mentioned above is well written, neat and clean, and the script is in good quality. I was told that openSUSE has already included patches to fix this problem, while Ubuntu's users are still struggling to either fix it by themselves or talking in the forums, trying to understand what to do.
PS. though I dislike SuSE due to their pact with Microsoft, they are doing really well in some fields. The article mentioned above is well written, neat and clean, and the script is in good quality. I was told that openSUSE has already included patches to fix this problem, while Ubuntu's users are still struggling to either fix it by themselves or talking in the forums, trying to understand what to do.
Monday, May 26, 2008
IBM/Lenove ThinkPad Battery Maintenance in Linux
I felt the deteriorate of the lifetime of the battery on my IBM ThinkPad T43p. This article has a good discussion on best practices. I also installed the tm_smapi driver and set charge threshold for my laptop.
Save battery, no waste. :)
Save battery, no waste. :)
Tuesday, May 13, 2008
China Earthquake Relief, Sichuan, 2008
The 2008 Sichuan earthquake occurred at 14:28:04.1 CST (06:28:04.1 UTC) on 12 May 2008, with its epicenter in Wenchuan County, Sichuan province of the People's Republic of China. It had a magnitude of 7.8 Ms according to the State Seismological Bureau of China and 7.9 Mw according to the United States Geological Survey.
With more than 60,000 recently confirmed dead so far, it was the deadliest and strongest earthquake to hit China since the 1976 Tangshan earthquake, which killed approximately 250,000 people.
Please consider donation to China Red Cross! Thank you!
With more than 60,000 recently confirmed dead so far, it was the deadliest and strongest earthquake to hit China since the 1976 Tangshan earthquake, which killed approximately 250,000 people.
Please consider donation to China Red Cross! Thank you!
Sunday, May 04, 2008
Qt Problem of Google Earth 4.3 Beta for Linux
On some systems (as Ubuntu Hardy 8.04) the Google Earth 4.3 Beta doesn't work very well, the fonts are ugly and tiny. You may try this workaround:
http://groups.google.fr/group/earth-linux/browse_thread/thread/e10a5337b0b47ba1#
On other systems (as CentOS 5.1) it may work very well out-of-box.
http://groups.google.fr/group/earth-linux/browse_thread/thread/e10a5337b0b47ba1#
On other systems (as CentOS 5.1) it may work very well out-of-box.
Monday, April 21, 2008
HOWTO: vsftpd's Virtual User Use Local Privileges
If you are using vsftpd with virtual users, as described in official example, and are suffering problems like this:
(you may see above text in client or server log), you may consider using "virtual_use_local_privs".
Per study of cpdohert, if you want vsftpd's virtual user follow local privileges, you have to use:
226 Transfer done (but failed to open directory).
(you may see above text in client or server log), you may consider using "virtual_use_local_privs".
Per study of cpdohert, if you want vsftpd's virtual user follow local privileges, you have to use:
virtual_use_local_privs=YES
Sunday, April 20, 2008
FTP Ascii Mode in KDE (kioslave)
Write a ~/.kde/share/config/kio_ftprc, with
Or use [] instead of [hostname] to make it used everywhere.
Warning: this will likely mess up any transfers of binary files.
In courtesy of David Faure.
[hostname]
textmode=true
Or use [] instead of [hostname] to make it used everywhere.
Warning: this will likely mess up any transfers of binary files.
In courtesy of David Faure.
Steps to Upgrade MoinMoin Wiki from 1.5.* to 1.6.*
I've been using the MoinMoin Wiki from Debian Testing for some time and this morning I found it was upgraded from 1.5.8 to 1.6.2, and unsurprisingly, my Wiki installation stopped working, very obviously some data migration may be necessary.
After wasted some time, I found a good article: Thomas Waldmann's AnotherWayToMigrateFrom1.5To1.6. I couldn't find a good official migration guide like this, which told you that you must run cache cleaning and data migration.
Hope this is useful to other MoinMoin users.
After wasted some time, I found a good article: Thomas Waldmann's AnotherWayToMigrateFrom1.5To1.6. I couldn't find a good official migration guide like this, which told you that you must run cache cleaning and data migration.
Hope this is useful to other MoinMoin users.
Wednesday, April 16, 2008
Use pdftk to Update PDF File's Meta Data
A good tool, pdftk, can be used to manipulate PDF files, changing meta-data, page-juggling, etc., you name it! And it's GPLed.
Easy, peasy, japanesey.
Easy, peasy, japanesey.
Tuesday, April 15, 2008
Error of Running VMware Server 1.0.5 on Debian 4.0 Etch
I installed VMware Server 1.0.5 on Debian 4.0 Etch (i686) today and couldn't start vmware-console due to this error:
To fix this problem, start VMware by running:
For more information on this please click the title, which leads to a post on VMware community website.
(vmware:20921): libgnomevfs-WARNING **: Cannot load module `/usr/lib/gnome-vfs-2.0/modules/libfile.so' (/usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6))
To fix this problem, start VMware by running:
VMWARE_USE_SHIPPED_GTK=yes vmware
For more information on this please click the title, which leads to a post on VMware community website.
Sunday, April 13, 2008
RPM Spec: conditional build based on host distro
When writing spec of RPM, often you need to write some special instructions that are needed only on some distros or versions, but not all. You can use this:
# Do something for FC4 and beyond.
%if 0%{?fedora} >= 4
# ...
%endif
Tuesday, April 08, 2008
Tweak GNOME Auto Mount Options
Use gconf-editor to edit the key:
The most useful one for me to add is "iocharset=utf8".
/system/storage/default_options/vfat/mount_options
The most useful one for me to add is "iocharset=utf8".
Friday, April 04, 2008
Ignoring .svn directories with grep
Have lived with Subversion for many years and finally I found this (link to outside my blog) simple little trick. :)
Wikipedia Unblocked (temp) in China
Now I can access Wikipedia in China without using a proxy, not all contents, only a large part. This is a big step forward.
As well as blogspot.com, wow!
May His Holiness let this last.
As well as blogspot.com, wow!
May His Holiness let this last.
Saturday, March 15, 2008
Choose a Linux-friendly Bank in China
At last I thought I should spend some time on finding a Linux-friendly bank. By Linux-friendly I meant that the e-Bank services should be able to achieved from a Linux machine running native browsers such as Firefox. I've been using China Merchant Bank for nearly 10 years and although generally good, their eBank services are designed around IE and ActiveX. What's more annoying is that their bank software could not be run within a virtual machine, alleged for the sake of better security, which shut all doors to run it on Linux.
I used eBank to manage loads of things such as utility payment, donations, credit card payment and investment management. So it's really a waste of time to reboot to MS WindowsTM to do them.
So finally I chose Shanghai Pudong Development Bank. It's eBank services are great with Firefox! Till now I'm happy with it. I've also applied for the credit card and hope to move all my credit card subscriptions to it gradually.
Now the only gray area for me is that my employer doesn't support to pay into SPDB. I'll keep complaining to my beloved HR manager. :)
N.B. HSBC is doing very well with Linux too. Who (I guess) has been running IBM's AIX and System z for a long time and is generally browser-independent.
I used eBank to manage loads of things such as utility payment, donations, credit card payment and investment management. So it's really a waste of time to reboot to MS WindowsTM to do them.
So finally I chose Shanghai Pudong Development Bank. It's eBank services are great with Firefox! Till now I'm happy with it. I've also applied for the credit card and hope to move all my credit card subscriptions to it gradually.
Now the only gray area for me is that my employer doesn't support to pay into SPDB. I'll keep complaining to my beloved HR manager. :)
N.B. HSBC is doing very well with Linux too. Who (I guess) has been running IBM's AIX and System z for a long time and is generally browser-independent.
Thursday, February 28, 2008
A Talk with Andrew Morton
On Feb 20th, 2008, Tina and I attended the Eating the Linux Kernel party:
"Thanks to the Linux Foundation and China OSS Promotion Union we're
organizing a diner with all the great speakers of the Linux Developer
Symposium. This is going to be the one opportunity to share food and
thoughts with people like Andrew Morton, Jonathan Corbet, Dave Neary,
Jeff Waugh and many many others. In total probably 20 specialists from
the kernel development, Linux embedded or Gnome development
exclusively for Beijing LUG members..."
Fortunately I had a chance to have a talk to Andrew Morton who seated
besides me:
(This is not a verbal transcript of the talk, nor has Andrew Morton
endorsed it and he has no responsibility for whatever listed here.
This is just a fast record of a gossip and please don't take it
seriously.)
YL: Hi Andrew, you look tired, are you working busy on 2.6.25?
AM: Yes, it takes me lot of time.
YL: When will you leave Beijing?
AM: Friday. Take a tour tomorrow (Thursday) in Beijing.
YL: Can I ask you some questions about the kernel? Why Linux doesn't
maintain a stable ABI. Currently each time the kernel updates, all
3rd party modules will have to be recompiled. And this is really
annoying for many users.
AM: What 3rd party modules?
YL: For example, the one of Madwifi, and fglrx, the proprietary driver
for ATI cards.
AM: Are they GPL?
YL: Oh, no, part of it is a non-GPL blob. So I see the reason why the
kernel doesn't support them well is that they are not free software.
So can I say that the rumor is true that you intentionally break the
ABI to make using 3rd party modules difficult?
AM: No, we don't break them _intentionally_. We just don't care about
it. If we were to support a stable ABI, it will make the development
and maintenance of the kernel much more difficult. We won't support
non-GPL code by compromising free software.
YL: But if you made the installation of some proprietary drivers
easier, more users would come to use Linux. And if you had more
users, you have more developers. And this will promote the development
of the kernel.
AM: Yeah, it's true. But we just can't support proprietary software by
ways of compromising free software.
YL: Do you have a plan, or a long-term goal of the kernel development?
AM: No, we have no plan. And this is just the point of kernel
development (and maybe other free software project). The users decide
where the kernel goes. If you need a function, just as he (a man sit
besides AM) just said, if you need to support Chinese display in
Linux, just implement it and send me the patch, and if it's good
enough, we'll include it in the kernel.
YL: If the kernel itself has no concrete plan for what functions
should be supported and what not, and accepts everything good enough
from the users, won't the kernel became bloated quickly?
AM: No it won't. Everything is configurable. If you don't need it,
disable it.
YL: But the kernel is already very large, the binary is 20Mb, and the
source codes are somewhat more than 300Mb.
AM: I think it's not a problem. The core part of the kernel takes only
1Mb memory at run-time. And I see 300Mb is not a problem for today's
hard drive.
YL: The kernel is so large, and has too many things in it. I see
another problem with this approach. Say if you found a bug in a driver
for an ancient piece of hardware and you updated the kernel. Then all
users have to update just to pull in something they'll never used.
AM: Oh, I've to say sorry for that. You can say it's a problem.
YL: Can we just split this large kernel into several loosely coupled
projects? Say, one project for a kernel core, one project for file
systems, one project for the network layer and some other projects for
drivers.
AM: That maybe to difficult for maintenance.
YL: So do you thing micro-kernel would solve this problem, or are you
a fan of monolithic kernel?
AM: Monolithic kernel is much more efficient and easy to develop.
YL: Another question, does the kernel team have a plan to add
automatic test to cover some key functions?
AM: No, auto test doesn't work as we tried before. I've been
following the LTP project for more than 2 years, and only 2 bugs were
found by those automatic tests. Most of the kernel bugs are only
reproducible on some special pieces of hardware and you just have no
way to use automatic test to cover them.
For the core part, things like scheduler, file system, etc., is used
by everyone so they are thorough tested by everyone, and for the other
parts, like various drivers for special hardware, only those have that
hardware can test it. So auto test has few use for this.
YL: Do you think the kernel can be better maintained or developed by a
team?
AM: No. It won't get better if you put a lot people in a building.
The communication would take too much time. I see it's efficient
enough to communication by using mailing list. I get bored soon
during a long meeting so I just leave and ask them to send mails and
code snips to me and we can have better understanding on technical
problems.
YL: Do you think attending symposiums, lectures and parties like this
is a waste of time? Do you think you can better use the time for
hacking?
AM: Oh, I don't like this before I go, it's not good to travel for
long time on plane. But when the event was finished I thought "oh,
it's not bad." These are things for promotion. For example, before I
went to Japan some years ago, there's few patch from Japanese
developers. And after some lectures there, the patches from Japan now
skyrocketed to be around 20% among all patches. So it has a snowball
effect and that's why I attended these events. I hope I can get more
patch from Chinese developers.
YL: Do you have a laptop?
AM: Yes, it's a ThinkPad.
YL: Oh, I'm using a ThinkPad too. But I have to use proprietary blobs
to support the wireless as well as ATI video card. Though I don't use
3D acceleration much, I do need the 2D acceleration for daily work.
The open source driver is slow on 2D performance.
AM: Yeah, ThinkPad has poor 2D performance but it's bearable. I just
use the default open source driver. For wireless my laptop is running
ipw3945 driver and that's the only binary blob on my laptop.
YL: So does your suspend and hibernation work well?
AM: No, they don't. (shrug)
YL: What's your main work time and for how long you sleep a day?
AM: Huh! I work most of the time, and sleep from around 3am to, say,
11am.
YL: I remember you wrote an article said that the 2.6 kernel is slowly
getting buggier.
AM: Yes. People should spend more time on fixing bugs.
YL: What's your personal plan for the following years?
AM: I may quit in about 1 or 2 years and then I won't spend much time
on maintenance. I'll continue to work on the kernel, perhaps focusing
on bug fixing.
YL: So how about the mm tree?
AM: No need to worry, some other people will set their own branches to
take the position of it.
YL: Have Google asked you to do something special for them?
AM: No, they just pay me to do whatever I want to do.
"Thanks to the Linux Foundation and China OSS Promotion Union we're
organizing a diner with all the great speakers of the Linux Developer
Symposium. This is going to be the one opportunity to share food and
thoughts with people like Andrew Morton, Jonathan Corbet, Dave Neary,
Jeff Waugh and many many others. In total probably 20 specialists from
the kernel development, Linux embedded or Gnome development
exclusively for Beijing LUG members..."
Fortunately I had a chance to have a talk to Andrew Morton who seated
besides me:
(This is not a verbal transcript of the talk, nor has Andrew Morton
endorsed it and he has no responsibility for whatever listed here.
This is just a fast record of a gossip and please don't take it
seriously.)
YL: Hi Andrew, you look tired, are you working busy on 2.6.25?
AM: Yes, it takes me lot of time.
YL: When will you leave Beijing?
AM: Friday. Take a tour tomorrow (Thursday) in Beijing.
YL: Can I ask you some questions about the kernel? Why Linux doesn't
maintain a stable ABI. Currently each time the kernel updates, all
3rd party modules will have to be recompiled. And this is really
annoying for many users.
AM: What 3rd party modules?
YL: For example, the one of Madwifi, and fglrx, the proprietary driver
for ATI cards.
AM: Are they GPL?
YL: Oh, no, part of it is a non-GPL blob. So I see the reason why the
kernel doesn't support them well is that they are not free software.
So can I say that the rumor is true that you intentionally break the
ABI to make using 3rd party modules difficult?
AM: No, we don't break them _intentionally_. We just don't care about
it. If we were to support a stable ABI, it will make the development
and maintenance of the kernel much more difficult. We won't support
non-GPL code by compromising free software.
YL: But if you made the installation of some proprietary drivers
easier, more users would come to use Linux. And if you had more
users, you have more developers. And this will promote the development
of the kernel.
AM: Yeah, it's true. But we just can't support proprietary software by
ways of compromising free software.
YL: Do you have a plan, or a long-term goal of the kernel development?
AM: No, we have no plan. And this is just the point of kernel
development (and maybe other free software project). The users decide
where the kernel goes. If you need a function, just as he (a man sit
besides AM) just said, if you need to support Chinese display in
Linux, just implement it and send me the patch, and if it's good
enough, we'll include it in the kernel.
YL: If the kernel itself has no concrete plan for what functions
should be supported and what not, and accepts everything good enough
from the users, won't the kernel became bloated quickly?
AM: No it won't. Everything is configurable. If you don't need it,
disable it.
YL: But the kernel is already very large, the binary is 20Mb, and the
source codes are somewhat more than 300Mb.
AM: I think it's not a problem. The core part of the kernel takes only
1Mb memory at run-time. And I see 300Mb is not a problem for today's
hard drive.
YL: The kernel is so large, and has too many things in it. I see
another problem with this approach. Say if you found a bug in a driver
for an ancient piece of hardware and you updated the kernel. Then all
users have to update just to pull in something they'll never used.
AM: Oh, I've to say sorry for that. You can say it's a problem.
YL: Can we just split this large kernel into several loosely coupled
projects? Say, one project for a kernel core, one project for file
systems, one project for the network layer and some other projects for
drivers.
AM: That maybe to difficult for maintenance.
YL: So do you thing micro-kernel would solve this problem, or are you
a fan of monolithic kernel?
AM: Monolithic kernel is much more efficient and easy to develop.
YL: Another question, does the kernel team have a plan to add
automatic test to cover some key functions?
AM: No, auto test doesn't work as we tried before. I've been
following the LTP project for more than 2 years, and only 2 bugs were
found by those automatic tests. Most of the kernel bugs are only
reproducible on some special pieces of hardware and you just have no
way to use automatic test to cover them.
For the core part, things like scheduler, file system, etc., is used
by everyone so they are thorough tested by everyone, and for the other
parts, like various drivers for special hardware, only those have that
hardware can test it. So auto test has few use for this.
YL: Do you think the kernel can be better maintained or developed by a
team?
AM: No. It won't get better if you put a lot people in a building.
The communication would take too much time. I see it's efficient
enough to communication by using mailing list. I get bored soon
during a long meeting so I just leave and ask them to send mails and
code snips to me and we can have better understanding on technical
problems.
YL: Do you think attending symposiums, lectures and parties like this
is a waste of time? Do you think you can better use the time for
hacking?
AM: Oh, I don't like this before I go, it's not good to travel for
long time on plane. But when the event was finished I thought "oh,
it's not bad." These are things for promotion. For example, before I
went to Japan some years ago, there's few patch from Japanese
developers. And after some lectures there, the patches from Japan now
skyrocketed to be around 20% among all patches. So it has a snowball
effect and that's why I attended these events. I hope I can get more
patch from Chinese developers.
YL: Do you have a laptop?
AM: Yes, it's a ThinkPad.
YL: Oh, I'm using a ThinkPad too. But I have to use proprietary blobs
to support the wireless as well as ATI video card. Though I don't use
3D acceleration much, I do need the 2D acceleration for daily work.
The open source driver is slow on 2D performance.
AM: Yeah, ThinkPad has poor 2D performance but it's bearable. I just
use the default open source driver. For wireless my laptop is running
ipw3945 driver and that's the only binary blob on my laptop.
YL: So does your suspend and hibernation work well?
AM: No, they don't. (shrug)
YL: What's your main work time and for how long you sleep a day?
AM: Huh! I work most of the time, and sleep from around 3am to, say,
11am.
YL: I remember you wrote an article said that the 2.6 kernel is slowly
getting buggier.
AM: Yes. People should spend more time on fixing bugs.
YL: What's your personal plan for the following years?
AM: I may quit in about 1 or 2 years and then I won't spend much time
on maintenance. I'll continue to work on the kernel, perhaps focusing
on bug fixing.
YL: So how about the mm tree?
AM: No need to worry, some other people will set their own branches to
take the position of it.
YL: Have Google asked you to do something special for them?
AM: No, they just pay me to do whatever I want to do.
Wednesday, January 09, 2008
(Don't) Use "Subpixel Smoothing" for Fonts in GNOME
I proposed that "Subpixel smoothing" was slow in my testing. But that result was machine-dependent. Some drivers were doing better than others. Personally I think Intel's video cards are better than that from nVidia (ATI's seems not bad either). I have to admit for some configurations subpixel rendering products better result. So it's totally up to you to decide whether to use it or not (I found myself enabled it on all my machines for now, even on a slow machine with nVidia card).
Old post follows:
It's extremely slow, while the gain in font appearance is little. This setting has contributed a lot to my bad impression about GNOME's sluggish display. Now I'm happy with "Best shapes."
In gnome-terminal, Subpixel smoothing is 3 times as slow as "Best shapes" rendering, on my laptop.
Old post follows:
It's extremely slow, while the gain in font appearance is little. This setting has contributed a lot to my bad impression about GNOME's sluggish display. Now I'm happy with "Best shapes."
In gnome-terminal, Subpixel smoothing is 3 times as slow as "Best shapes" rendering, on my laptop.
Tuesday, August 14, 2007
Gmail, Fetchmail and Sendmail on UNIX/Linux
Linux Home Automation hosts a good article, Linux, Sendmail and Gmail.com on how to configure sendmail to work with Gmail. My config is a bit simpler than his (tested on Fedora Core 4, 6, Red Hat Enterprise Linux 5, CentOS 5, should work on most modern Linux distros).
My fetchmail run control file (.fetchmailrc):
Modification to sendmail's mc file (/etc/mail/sendmail.mc):
To generate the authinfo file used above, refer to
Linux, Sendmail and Gmail.com. It's very simple and you can done it within 3 minutes.
My fetchmail run control file (.fetchmailrc):
set syslog
poll pop.gmail.com with proto POP3 and options no dns
user 'abc@gmail.com'
pass "WriteYourPasswordHere"
ssl
Modification to sendmail's mc file (/etc/mail/sendmail.mc):
define(`SMART_HOST',`smtp.gmail.com')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl
To generate the authinfo file used above, refer to
Linux, Sendmail and Gmail.com. It's very simple and you can done it within 3 minutes.
Monday, July 23, 2007
Install Amarok on CentOS5/RHEL5
Now I prefer to build amarok by using SRPM from latest Fedora on CentOS/RHEL. Though I think the following method should still work, it's not the best solution. The first problem is that Fedora 6 is no longer supported and you get no security patches, the second is that some packages from Fedora 6 Extra repo conflicts with similar packages from RPMForge, which is a must for nearly all CentOS/RHEL systems.
- Install livna and rpmforge repo.
- Add fedora-extras.repo:
[fedora-extras]
name=Fedora Extras 6 - i386
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/i386/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-6&arch=i386
gpgcheck=0
enabled=1
includepkgs=libnjb* libtunepimp* libifp* libmtp* libgpod* libofa* amarok* xine-lib wavpack
You see, we should include necessary packages only. - Edit CentOS-Base.repo, add following lines:
# exclude libgpod 0.4.0 to install libgpod 0.4.2 from FC6 repo for Amarok
exclude=libgpod - Add fedora-updates.repo:
[fedora-updates]
name=Fedora Core 6 - $basearch - Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc6&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
protect=0
includepkgs=libnjb* libtunepimp* libifp* libmtp* libgpod* libofa* amarok* - Edit rpmforge.repo, add:
exclude=xine-lib
Subscribe to:
Posts (Atom)