Upgrade to Firefox 2

Gentoo October 28th, 2006

Firefox 2 was released two days ago, and I got an upgrade in yesterday’s world update. Compared to Firefox 1.5.x, the speedup is barely noticeable, but there are some neat features I have demanded for a long time:

Built-in spell check This is quite essential for all the bloggers. It marks the typo on the fly, and you can easily add the new word to the dictionary. Unfortunately, I do not find any configuration in the Preference for the spell-check, but I believe that there would be a neat plugin ready in a few weeks to tweak: import/export custom dictionary, more language support, etc.

Search Suggest Yes, I must admit I am a bad speller. The search suggest would help to reduce the key strokes. Google, Yahoo and Answers suggests work out of the box. Other search engine add-on developers may catch on later.

Some joyful surprise:

Javascript 1.7 Javascipt 1.7 steals lots of cool features from Python, I would compare them head to head later.

And some annoyance:

Default ugly font The default font is quite ugly(left), you need to override the font and theme in ~/.gtkrc-2.0:

gtk-theme-name=“Clearlooks”
gtk-font-name=“Bitstream Vera Font 8″

and restart the Firefox(right).

Firefox 2.0 Preview


Backspace no longer stands for “Back” The Firefox 2.0 uses a new set of Hotkeys, the Alt - left arrow is assigned to Back, while the Backspace is assigned to Page Up. Thanks for your consideration for the Laptop users, Firefox team, but I prefer to stick to my habit. Anybody knows how to override the default Hotkey settings?

Update: Thanks to ehh, the solution is in page about.config,
change browser.backspace_action to 0.

Memory leak? It is still unclear whether the core or the add-ons have memory leak problem. Is it feasible for Firefox developers to QA the add-ons listed , and issue “Designed for Mozilla Firefox” certification for qualified add-ons?

Firefox memory footprint


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

Sync Palm via Bluetooth

Palm October 13th, 2006

We have introduced how to synchronize Palm via IrDA, let’s move on to the next level: Synchronize Palm via Bluetooth.

Kernel matters

Linux kernel has built-in support for Bluetooth devices, you could build it into kernel or modules. The following configuration also includes the optional bluetooth headphone support, it does not hurt since everything is built into modules.

<M>   Bluetooth subsystem support  —>
 — Bluetooth subsystem support
      <M>   L2CAP protocol support
      <M>   SCO links support
      <M>   RFCOMM protocol support
      [*]     RFCOMM TTY support
      <M>   BNEP protocol support
      [*]     Multicast filter support
      [*]     Protocol filter support
      <M>   HIDP protocol support 
            Bluetooth device drivers  —>
                <M> HCI USB driver                                                 
                [*]   SCO (voice) support
                <M> HCI UART driver

In the user land, we need to install BlueZ, the Linux Bluetooth protocol stack, in Gentoo, just

emerge bluez-libs bluez-utils

We need to modify /etc/bluetooth/hcid.conf to make it fit into our needs:

options {
    autoinit yes;
    security user;
    pairing multi;
    pin_helper /usr/bin/bluepin;
}
device {
    name “BlueZ (%d)”;
    class 0×100;
    iscan enable; pscan enable;
    lm accept,master;
    lp hold,sniff,park;
    auth enable;
    encrypt enable;
}

bluepin is a PyGTK-based dialog to prompt the password, if you don’t install X or do not change the PIN whenever a new device is connected, you could just feed the pin directly like this [2]:

pin_helper /etc/bluetooth/pin;

in /etc/bluetooth/pin:

MY Personal Pin

OK, plugin the bluetooth adpater. Enable your Palm’s Bluetooth for the first test drive:

$ hcitool scan
Scanning …
        00:07:E0:0E:B6:CC       My Palm

OK, at least the Bluetooth adapter works, kernel modules loaded, and BlueZ take actions for the new device.

NOTE: For the curious users, please check /etc/udev/rules.d/70-bluetooth.rules to demystify the magic.

Tie a knot

In Palm side, create a new connection named “Bluetooth to PC” in Preference | Connection | New … like this, then click Device: Tap to find. If this is the first time to bind the handheld and desktop, bluepin would popup to ask for the authentification token.

Discover and Bind


Then create a new Network in Preference | Network | New , click Details …, then click Script …, and delete all scripts, like this:

Network setting


The light of the tunnel

Bluetooth synchronization is quite different than the previous two local HotSync, it is a Modem HotSync via dial-up network on bluetooth tunnel. We need to build the dail-in server in Linux side:

Build the kernel modules in Device Drivers | Networking Support


<M>     PPP (point-to-point protocol) support
[ ]       PPP multilink support (EXPERIMENTAL)
[ ]       PPP filtering
<M>       PPP support for async serial ports
<M>       PPP support for sync tty ports
< >       PPP Deflate compression
< >       PPP BSD-Compress compression
< >       PPP over Ethernet (EXPERIMENTAL)

In the userland, install the ppp package and enable the ip forwarding:

emerge ppp
echo 1 > /proc/sys/net/ipv4/ip_forward

Set up the peer-to-peer network, /etc/ppp/peer/dun

noauth
local
noipdefault
proxyarp
nodefaultroute
noipx
idle 0

# Host IP: target IP
192.168.15.100:192.168.15.88

ms-dns 192.168.15.1
netmask 255.255.255.0

Gentoo’s magic bluetooth service would launch the following service for us:

  • hcid: the Host Control Interface daemon to talk with L2CAP kernel module.
  • sdpd: the Service Discovery Profile daemon to discover nearby bluetooth devices.
  • pand: the Personal Arean Network daemon to organize an Ad-Hoc PAN.
  • dund: Dial-up Network daemon to build a virtual serial link for dial-up network.
  • pppd: Point-to-Point Protocol daemon

Edit the /etc/conf.d/bluetooth:

# Bluetooth configuraton file
# Start of hcid (allowed values are "true" and "false")
HCID_ENABLE=true
# Config file for hcid
HCID_CONFIG=“/etc/bluetooth/hcid.conf”
# Start sdpd (allowed values are "true" and "false")
SDPD_ENABLE=true
# Start hidd (allowed values are "true" and "false")
HIDD_ENABLE=false
# Arguments to hidd
HIDD_OPTIONS=“”
# Run hid2hci (allowed values are "true" and "false")
HID2HCI_ENABLE=false
# Bind rfcomm devices (allowed values are "true" and "false")
RFCOMM_ENABLE=true
# Config file for rfcomm
RFCOMM_CONFIG=“/etc/bluetooth/rfcomm.conf”
# Start dund (allowed values are "true" and "false")
# If you want to use dund, you must install: net-dialup/ppp .
DUND_ENABLE=true
# Arguments to dund
DUND_OPTIONS=“–listen –persist –msdun call dun”
# Start pand (allowed values are "true" and "false")
PAND_ENABLE=true
# Arguments to pand
PAND_OPTIONS=“–listen –role NAP”

Once the bluetooth adpater is plugged in, the corresponding services are launched, you can test the connection with either Merge Ping, or use the command line: Preference | Network | Option | View Log, then write ping www.foo.com

The last, but not the least

In HotSync | Options | Modem Sync Prefs…, hightlight Network
In HotSync | Options | Primary PC Setup…

Primary PC Name: leave blank
Primary PC Address: IP Address of the computer
Subnet Mask: Netmask of your network

NOTE Primary PC Name is parsed by the DNS, the best practice is to leave it blank.

When HotSync, select, Modem and Unix as the network. In the desktop side, use net:any to replace /dev/pilot in the previous HotSync settings.

Reference
[1] Synchronize your PalmOS� Handheld over Bluetooth in Linux
[2] HOWTO mobile phone, Bluetooth and GNOME
[3] [HOWTO] Bluetooth and Palm (or PocketPC) Network and Sync

UPCUnit - A unit test extension for UPC

Development October 10th, 2006

UPCUnit is a CUnit test extension for Unified Parallel C(UPC) programming language. It addresses the UPC-specific issues which CUnit does not cover, like collective test of returned values, reorganize of threads’ output, etc. Currently, only the basic non-interactive console is released.

UPCUnit is released in LGPL, as CUnit, also depends on CUnit.

It is almost full-fledged for daily use since it targets the test automation, do we really care about the interface and output when debugging? If there are some feedback or feature request from the community, I might consider to add other interfaces like ncurses, XML.

You can download the tarball from here.

Google, Web 2.0 Killer?

Web October 5th, 2006

Google just launched the Code Search project, it is still in the cradle of Google Labs, but it works very well, even surpasses some specialized code search service. For example, search upc_all_reduce, which is a collective function call in UPC proposal. Neither Koders or Krugle return any result, but Google Code Search does. Considering the massive amount of page indexes, it is not a surprise.

Google Code Search keeps the universal user-friendly Google interface, simple and sleek, plus the charisma of Google brand; I doubt whether Koders is another Kiko. The start-up companies need not only inovative ideas, but alos fast growth before Google enters the field, otherwise, the best solution is to be purchased by Yahoo. Google acts as the Microsoft in the desktop computing environment, it can easily take the lead in a new field; unlike the gaint in Redmond, Google achieves it via advantage in information acquiring and querying instead of monopoly in th OS.