HOWTO display sharp Chinese in Gentoo Linux?

Desktop, Development, Gentoo May 11th, 2007

It has been the biggest headache to configure Linux desktop environment to display sharp Chinese glyphs. Personally, I would rather trace the segmentation errors rather than setup the Chinese font. For years, I was satisfied with the bottom line, i.e to browse the Chinese web page using Firefox, input Chinese when necessary.

It is quite embarrassing to stick to the ugly Chinese display as a geek, I would summarize my efforts to configure the Chinese fonts.
Read the rest of this entry »

Make it work

Desktop, Gentoo, Palm February 12th, 2007

The KPilot 3.5.5 once worked fine for my Tungsten T, and it still served for the Treo application installation and backup. Unfortunately, the KPilot could not synchronize the TODO or calendar, the kpilotDaemonn just crashed without a trace, in fact that is my fault, the konqi is not installed in my system.

KPilot developers have released 3.5.6, and claimed that it has solved lots of long-lasting bug, including my patch as well. However, the KPilot 3.5.6 depends on >=pilot-link-12.0, while pilot-link is buggy for the python and java binding, which is reverse-dependency of JPilot. Anyway, all of them are masked.

Tim told us “Make it work”, let’s roll the sleeves.

In Gentoo’s bugzilla, #89823 is attached an unofficial ebuild for pilot-link, just copy it to pilot-link-0.12.2. Since we don’t really need the python or java binding, just disable the use flag in package.use and leave the patch where is.

Next, build kpilot-3.5.6, it would not compile for GCC 4.1.1. Em, interesting. The bug is straight-forward anyway, the compiler is just picky in doing const cast. With this patch, it works.

UPDATE Just contacted with kpilot developer, pilot-link has changed the interface in the version bump, so kpilot 3.5.6 is supposed to work fine with pilot-link-0.12.[01], this patch is for pilot-link-0.12.2 only.

Let’s put the pieces together:
pilot-link-0.12.2 ebulild, kpilot-3.5.6 ebuild, kpilot-3.5.6-const.patch

Now, KPilot 3.5.6 works fine, but put duplicated appointment when HotSync with Treo 650. That is quite annoying, I would like to use Undup as the work around, then dig into the code later.

supported by Hostseeq
Are you thinking of finding new web hosting services? Find out about good options for cheap web hosting at Hostseeq.com.
Hostseeq offers hosting information on Linux web hosting, also colocation hosting, and more.

Diagnosis of KPilot/Palm’s messy text

Desktop, Gentoo November 29th, 2006

It is a pain of ass that Palm does not support Unicode, definitely a big design flaw. It is also a pity that CJKOS would not support the Unicode either, we lost the last chance to patch the system by third party hack. I have to use the GBK encoding in Palm before the legendary PalmOS Garnet or Access Linux Platform available. Unfortunately, the KPilot fails to synchronize the name of the contacts from the KAddressbook, for example, 钟章环 becomes 章&, ^. It is quite curious that part of the string is encoded correctly. Later, I dig into the code, and found this code snippet:

if (!text.isEmpty())
        {
                fAddressInfo.entry[field] = (char *) malloc(text.length() + 1);
                strlcpy(fAddressInfo.entry[field], codec()->fromUnicode(text), text.length() + 1);
        }

The bug results in that the length of the UTF8 encoded string is not the same as the GBK encoded string. A workaround is like this:

if (!text.isEmpty())
        {
                QCString locale = codec()->fromUnicode(text);
                fAddressInfo.entry[field] = (char *) malloc(locale.length() + 1);
                strlcpy(fAddressInfo.entry[field], locale, locale.length() + 1);
        }

It has been submitted to the KDE Bugzilla, Bug 138108.

When Palm meets Linux

Desktop, Gentoo, Palm October 15th, 2006

Palm is an open platform for handheld computing, especailly PIM. However, the Palm Inc. / Access do not provide any official support for Linux. Thanks to the open source community to bridge the gap between Linux desktop and Palm handheld.

When Palm meets Linux
Dell Inspiron 700m, Palm Tungsten T, Syba USB Bluetooth Adapter, and Palm Sync cable(not shown in the picture).


Synchronization

Palm supports various synchronization accesses, serial, USB, IrDA, Bluetooth, Modem, Lan, Wireless. We would address three most commonly used ways.

USB Synchronization
This is the most common and reliable way to synchronize the device with the desktop.
1. Besides the standard USB support, build USB Serial(usbserial) and USB Handspring driver(visor) drivers into modules.

<M> USB Serial Converter support
<M>   USB Handspring Visor / Palm m50x / Sony Clie Driver

2. Update the udev rule in /etc/udev/rules.d/10-palm.rules:

# Palm Tungsten T
BUS==“usb”,SYSFS{product}==“Palm Handheld”,NAME=“pilot”

If you use Sony’s CLIE or Handspring’s Visor, you may take a look at cat /proc/bus/usb/devices to figure out how to identify the device. After you push the button of HotSync cradle, or click the BIG button in HotSync application, the device appears as /dev/pilot in Linux desktop.

IrDA Synchronization
Here is a detailed HOWTO about IrDA Synchronization.

Bluetooth Synchronization
Check this HOWTO.

Integration with KDE

TBD

Developement

TBD

Existed problems

  • KPilot does not convert the string from UTF-8 to zh_CN.gbk back and forth in synchronization (FIXED)
  • Mail plugin works only for legacy Palm mail

RSS feeds on th go

Desktop, Gentoo, Palm August 7th, 2006

I spend 3 - 5 hours for transportation weekly, and spend at least 40 minutes to browse/read the subscripted RSS feeds daily. What if I could utilize the trivial time in the metro to read something I am really interested in?

Here is one “just works” solution. Install Sunrise in the computer, and Plucker in the Palm. Export my favorite feeds from the RSS reader in OPML format, and import it to Sunrise which would synchronize the feeds and convert them to Plucker format later.

Import OPML

Download PDB files via kpilot to my Palm via IrDA. It works, but it involves in TOO MUCH interactivities with the users, you wanna catch the bus or not?

What I need is a cron job running in the background, check, convert and save. Whenever I do a HotSync, the files are updated; or just simply beam them to my Palm. Here is my proposal to work it around:

  • Develop a RSS fetcher/parser using RSS for Python to fetch the contents.
  • Develop a wrapper to invoke official Plucker Desktop to convert them to Plucker PDB
  • Develop a file synchronization plugin for KPilot
  • Customize a script to beam the files
  • Develop a init script to glue them together

Any suggestions?