WebOS hints and views
Hacking more Unicode into Touchpad (webOS)

The HP Touchpad (in fact webOS in general) supports Unicode (UTF-8), but the fonts are reduced, and do not even support the IPA (phonetic) extensions, which many online dictionaries require, or non-Latin character sets. And I needed more characters in order to demo a computational linguistic CGI application on the TP using Lighty (lighttpd). So I searched, and found.

What I have picked up on the forums may be illegal (so definitely please don’t do it, just in case), but this is how it works (in homebrew style):

1. Needed: a copy of arialuni.ttf (Arial Unicode MS).

2. Using ssh, Internalz Pro or WebOS QuickInstall etc., a backup copy of “Heisei_Kaku_Gothic_nb.ttf” in /usr/share/fonts should be made on /media/internal.

3. Then arialuni.ttf is copied to /usr/share/fonts/Heisei_Kaku_Gothic_nb.ttf”.

4. Rebooting is required.

Depending on the method used, the file system may have to be remounted as read-write before copying:

mount -o rw,remount /

And then as read-only after copying:

mount -o ro,remount /

All your own risk, and no guarantees for anything, of course, but after rebooting, a wide range of special characters should now be correctly rendered on the screen.

Making an ‘educated guess’, there seem to be two reasons for using “Heisei_Kaku_Gothic_nb.ttf”:

1. There is apparently not much room left where the fonts are located, and “Heisei_Kaku_Gothic_nb.ttf” is bigger than “arialuni.ttf”, so overwriting it does not overflow the space available.

2. The font “Heisei_Kaku_Gothic_nb.ttf” appears to be used by the browser.

The browser experts will know if these reasons - or others - are valid or just vacuous speculations. And there will no doubt be other methods as predicted by Larry Wall’s Law: ‘There’s more than one way to do it’.

Short test of Govnah (Veer)

This test applies to Govnah (V 1.0.9), the webOS administration tool for various kernel parameters, including overclocking, e.g. with the versatile UberKernel (V 19). Govnah and UberKernel are available from Web OS Internals via the Preware package manager.
First, profiles for each setting of the Governor parameter were defined. The only other parameter to be tweaked was to distinguish between two userspace speed settings: min (122.88 MHz) and max (1.2096 GHz).
A fairly intensive performance test was conducted by alternating as quickly as possible between the forefronted Camera and Facebook applications, always reloading the latter. The effects were judged (just by me) subjectively from a user perspective. Battery effects were not investigated.
The results fell into two main categories, within which settings were practically indistinguishable):
Fast & smooth: ondemandtcl, ondemand, userspace max, performance. Perhaps the powersave setting with all values at max was marginally superior, but this may be autosuggestion…
Slow, laggy and jerky: conservative, userspace min, powersave.
These results were expected, indicating the effectiveness of the kernel settings. The more use sensitive on demand settings are thus preferred.
An unexpected result was that the maximum graph frequency shown at all settings in the first group was 806.4 MHz, not 1.2096 GHz. Whether this setting is missing, or the graph is incorrect, or whether the effect was due to some oversight on my part concerning dependencies between parameters I cannot tell.

WebOS devices as local web servers

For professional presentations and demos I sometimes use a webOS device (from Pre- to Pre3 or TouchPad - no difference) as a web server on a local WLAN.
Since in such environments there are typically laptops, notebooks, netbooks, tablets, smartphones galore, this obviates the need for a data projector, enabling such activities in arbitrary locations and allowing each participant to save and copy whatever he needs, instead of being coerced into staring at a picture on the wall and laborious note-taking.
The server I use is “lighttpd” (“Lighty”), available on Preware, with CGI applications and JavaScript apps. For configuration hints see my earlier posts below and the WebOS Internals wiki.

Touchpad review from a business perspective


I am very pleased with my HP TouchPad, at the same time very puzzled. So this is my take on what it is good for.

Why was the HP TouchPad announced as an enterprise machine within a long-term strategy of connectivity, yet presented contrariwise as an entertainment and lifestyle device by showbiz celebrities as a potential iPad killer, looking like and priced like an earlier iPad, finally subject to poor sales and, without waiting for the Christmas market, jettisoned in an end of the line firesale, where it reached rocketing sales levels, surpring everyone, including HP? There are lessons to be learned.

The TouchPad, like other webOS devices, was mainly reviewed in developer circles and from a lifestyle perspective. The US advertising strategy was comedy oriented and in Europe advertising was entirely absent. So how did the reviewing go? Despite the plastic, the appearance made a good iPad 1 type impression (despite the poor precedent provided by the plastic casing on the Pre phones), and, led by this, reviewers focussed on superficial weaknesses in an iPad / Android lifestyle context: some entertainment apps missing, no word processing on release, slower during first use (actually due to initial cloud synching), slowness in general (partly due, it turned out, to HP deploying massive process logging), and lack of CPU processor speed/consumption options.

Most of these points have since been corrected: after synching was done speed improved, an OS update improved speed again, and WebOS Internals homebrewers produced safe overclocking and battery saving, and disabling of logging, leading to excellent performance. Word processing and spreadsheet processing have recently been introduced by QuickOffice (a presentation editor is announced), and several text editor apps are available. And the lack of an SD card and video out can to some extent be compensated for by email, cloud sharing apps, and the massive free 50 GB box.net account which comes with the TouchPad.

So, forgetting the lifestyle hype, what about the business perspective now, after all these improvements?

Working evironment: hardware and connectivity

HP provides an ergonomically optimal working physical environment for business use: the Touchstone wireless charger stand for the device, allowing vertical and horizontal positioning, a versatile protective folding case permitting steep or flatter rest angles, an stylish non-folding bluetooth keyboard with full 18mm standard key spacing and some TouchPad specific keys, which permits normal high-speedh touch typing, and  pairs easily with the device.

I have also used the TouchPad with folding bluetooth keyboards such as the ThinkOutside (now iGo) Stowaway (full 18mm spacing) and the Nokia SU-8W (compacte 15mm spacing, like eeePCs). The QWERTZ versions produce QWERTY output, not a big problem in general, and in a serious strategy, drivers could be developed. I have found that a capacitive stylus for mouse-like functions makes working at keyboard distance much easier: more precise contact, with the added bonus of no finger grease on the screen.

The TouchPad pairs with the Nokia LD-3W bluetooth GPS receiver (code “0000”). I have read that other GPS receivers can also be used. The MetaViewSoft Mapping Tool (Pro) is currently the only app which can provide a map display of the satellite fixes (more as a proof-of-concept at the moment: longitude is correct, but latitude is too far north, at least for my European location). The Mapping Tool requires “GPS” to be added to the receiver name string in the bluetooth configuration dialogue.

A 3G version of the TouchPad is not strictly necessary, because there are good mobile hotspots on the market.  Actually, a webOS phone provides two connectivity functions for the TouchPad: first, internet connectivity with the phone’s mobile hotspot app, and second, hands-free phone connectivity (only a webOS phone, apparently) via bluetooth. It was a pleasant surprise to find that the bluetooth keyboard and the bluetooth phone both function simultaneously. SMS text functionality is not implemented, so the phone itself must be used for this. I use a somewhat battered Palm Pre- for phone and internet connectivity with the TouchPad - no need to use webOS 2 devices.

Many of the lifestyle type reviews have noted that audio quality with Beats audio is the best on the tablet and smartphone market. I cannot judge this, but audio quality is certainly excellent, both on the tablet speakers and of course via external audio equipment. This is important for on-screen professional presentations with a small number of partners. I have not checked bluetooth audio yet, but there are plenty of discussions of this in the lifestyle type reviews.

Summary: from the hardware and connectivity point of view, at least netbook equivalent, but with additional connectivity functions.

Office functionality

The TouchPad PIM implementations are very good. Email (though threading would be an additional asset), Calendar (via Google Calendar), Contacts (well thought-out Synergy solution), etc., and Search (equally well thought-out Just Type solution, which provides an option to add more websites to the search domain ad lib). There are many more useful productivity apps.

The Synergy concept integrates Skype audio and video seamlessly into the phone app as an option, and Skype chat into the messaging app as an option, with links between the two. The Facebook app is also excellent and said to be the best on any device, and the Spaz Twitter app is also very good. There are also a couple of multi-account apps available. There is quite a large number of news apps from international and regional news agencies, and news via YouTube or television sites (both with and without Adobe Flash) is highly accessible.

Text editing (a number of apps) and word processing (QuickOffice) are also adequate for everyday use, with the usual minimal formating options on the writing side. With the keyboard, some of the customary CTRL-… options are available. Document connectivity (on-board, Google Docs, Box.net, Email, etc.) is very good. A PowerPoint editor is promised. There is no problem importing and displaying any of the usual Office document formats. PDF viewing is delegated to the Adobe reader, and there are 2-way format conversion apps which supplement the basic editors and the wordprocessor.

Summary: the office type functionality of the TouchPad is very good.

Homebrew enhancements

The main homebrew enhancements which I use, via WebOS QuickInstall (WOSQI) and Preware by WebOS Internals), are oriented towards speed (battery-saving overclocking kernels controlled by the Govnah app; blocking of all but minimal process logging), data management and security (Internalz, Save/Restore),  internet connectivity (ssh/sftp, and the Optware lighttpd - Lighty - web server).

Unfortunately there is no easy solution to providing a command line terminal for the TouchPad (WebOS Internals provides chroots for Xterm, Debian and Ubuntu, which require dev level OS versions), but it is easy to ssh into the device from outside, even from the Terminal app on the Palm Pre-, and then ssh/scp out again. This solution thus permits ssh/scp use from the TouchPad while on the road. Ultra-nerdy, but it works well.

The Lighty web server is very useful: for consulting reference HTML documents, for distributing any kind of document within whatever network one happens to be connected to, for CGI applications (Linux shell, python etc), and I also use it with some useful (unchanged) JavaScript applications which I wrote about 10 years ago. The distribution functionality compensates for some of the connectivity which an SD card would provide. I have updated the Lighty description on the WebOS internals wiki (see also earlier entries in this blog thread). Sure, this is also an ultra-nerdy solution, but it need not be: it would presumably not be a big problem to provide an app which would make the use of Lighty into a unique regular feature integrated into the dashboard config menu rather than a homebrew hack option.

Summary: There are many relevant homebrew enhancements to the business use case environment, which could be included as official features.

Sample use case: international conference

Practically all of the functionality which has been discussed in the preceding sections came into play at a recent big international conference: note taking, document writing and exchange, travel information, information distribution via social networking, news-reading, maps (and of course lifestyle stuff after hours). And with the snugly fitting multi-position case on the desk, the TouchPad is a much less distracting tool than a netbook and of course than a laptop. In terms of efficiency, multitasking with multiple card stacks permitted easy instant access to notes, programme, presentation abstracts, network information sources, email, calendar, etc.

 The only missing conference use case functionality is PowerPoint editing and display, but editing is promised, and at least it is not a problem to distribute files from the device, either via USB or via the Lighty web server. The Margi Presenter on PalmOS permitted direct PowerPoint presentations via SD card slot and cable, and there are remote slide switcher apps for the TouchPad - so why should screen cloning functionality not also be available under webOS via wireless? And webcam functionality, come to think of it, would be a nice addition - if Skype works, then so should webcams.

The TouchPad aroused a lot of interest in the conference environment with this useful business functionality. The simplest way to describe the device to interested parties was as “a bit like an iPad, but much more useful for these professional purposes”.

Summary: Very satisfied with this use case.


For my professional purposes (having used laptops, netbooks etc. ever since the Sinclair Z88, PalmOS devices since 1997, the Nokia n800/n810 internet tablets since 2008) the TouchPad is as near an optimal device as possible at the moment. So - leaving top-level management company strategy out of consideration - why did HP not leverage this business use case environment in their advertising?

It seems to me that HP public relations and top level management did not take their own requirements specification for enterprise use very seriously. In a professional environment. The hype about an iPad killer clearly contradicted HP’s avowed aim of producing an enterprise oriented device as a long-term strategy. Superficial impressions of first reviewers (plasticky case, minimally greater weight than competitors, slower speed on first use due to profile synching, slower speed in general due to massive process logging) underlined this contradiction. Note that Apple built up its eco-system gradually over a decade: iPod, iPod Touch, IPhone, iPad, like the car manufacturers do: get he customers hooked on a good small product and they will remain loyal when they switch to larger and more expensive products. But an even earlier case was ignored and this aspect was not leveraged. Let’s not forget, after all, that the US Robotics Palm Pilot (originally a further development of the Apple Newton touchscreen PDA in the 1990s) led to the first smartphone (Handspring/Treo) and was very successful for over a decade until the Blackberry and the iPhone came along. The ecosystem and a loyal user base were there.

To sum up: my experiences with the TouchPad so far make it very hard for me to understand why HP first declared that it is part of a long term webOS enterprise strategy, then fruitlessly hyped it as a lifestyle machine, finally apparently lost patience when it predictably didn’t sell as a lifestyle machine. I really wonder seriously why HP didn’t make a much bigger deal out of enterprise use cases. Maybe it’s happening right now behind closed doors. In any case, since the development is done, it would not be to hard to revive dthe device, maybe under a face-saving new name, like other companies do after a catastrophe. With the projected Agilent type personal systems spin-off, maybe this is what is going on. In any case, I will continue using the TouchPad with pleasure, as I am doing right now, and hoping that it will re-surface with a more coherent strategy than before, perhaps as an inexpensive loss-leader selling like hot cakes as in the firesale, with income from business apps and cloud services - as with classic telephone providers. And, as an after thought, maybe from games, too.

Autostart ssh and lighty demons

Maybe there are better or more elegant ways of doing this, but I did not have too much time to figure them out. Please let me know if you have a better method.

1. The startup files should be in the “/etc/event.d” folder:


Apparently, the Lighty demon startup gets put there on installation, and apparently this does not apply to the openssh demon. Therefore copy:

cp /media/cryptofs/apps/usr/palm/applications/mobi.optware.openssh/upstart/mobi.optware.openssh /etc/event.d

2. Add the following lines at the end of “/etc/profile”:

# Start sshd and lighttpd on login                            
/sbin/stop mobi.optware.openssh > /dev/null
/sbin/start mobi.optware.openssh > /dev/null
/sbin/stop mobi.optware.lighttpd > /dev/null
/sbin/start mobi.optware.lighttpd > /dev/null

Various WebOS utilities (ssh, findutils, mlocate)


This description applies to Linux environments. First install Preware, using WebOS Quickinstall, if it is not already installed. Optware is also required.


From Preware install openssh and Terminal. Then using Terminal do


to create private and public keys. Wait, then accept default filename by pressing Enter. Enter passphrase, type

cd /home/root/.ssh
mv id_rsa.pub authorized_keys
scp id_rsa x@y:.ssh

where x@y is the user and machine for accessing the pre, and it is assumed that ssh is installed on that machine. Login from x@y using the previously entered passphrase. Use ‘ssh’ and ‘scp’ in the usual way.

findutils, mlocate

mount -o rw,remount /
ipkg-opt update
ipkg-opt install findutils
ipkg-opt install mlocate
mount -o ro,remount /

Do not forget the remount line!

The utilities ‘findutils’ and ‘mlocate’ contain ‘find’, ‘xargs’, ‘locate’, ‘updatedb’. Usage for ‘locate is:’

locate <filenamesubstring>

My preferred usage for updating is:

updatedb -U /

The file ‘/etc/updatedb.conf’ can be edited if desired:

# PRUNENAMES=”.git .bzr .hg .svn”
PRUNEPATHS=”/tmp /var/spool /md5sums /proc /sys”
PRUNEFS=”NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs

Some of the PRUNEPATHS and PRUNEFS entries are not necessary, but harmless.

MBROLA speech synthesis engine on webOS

MBROLA is a versatile diphone synthesis engine using traditional technology and has been available since 1996. There are compilations for many operating systems, from SunOS through various WinX and ***x to Arm. See:


The version of MBROLA which was compiled for Nokia N800 and N810 using an Arm processor also works ‘out of the box’ on the Pre Minus command line with the usual syntax:

mbrola [options] <voice> <phofile> <wavfile>

Playing the output wav file on the command line is a bit tricky. It seems that on webOS 1.4.5 Alsa audio (aplay) does not work. However, Pulse Audio (paplay) does work, if a default device is provided:

paplay -d pdefaultapp out.wav

It may be convenient to have this in a script:

# play-webos.sh <audio.wav>
# D. Gibbon
# 2011-06-16
paplay -d pdefaultapp $1

It may also be convenient to put the MBROLA command in a script:

# play-mbrola.sh
# D. Gibbon
# 2011-06-16
mbrola $1 $2 out.wav
paplay -d pdefaultapp out.wav

Doc for webOS Python CGI

1. Maybe not many will need to run Python or bash CGI scripts on the Pre (Minus), but I have lots of stuff dating back many years which I still find useful.

2. The WebOS Internals wiki does not provide much information on classic CGI for Lighty (lighttpd), so I filtered it out of the web, a slightly confusing process.

3. Knowledge of Linux is obviously presupposed, as is knowledge of how to install Lighty and a Terminal app via the Preware app, and also how to install from Optware and Preware via the Pre command line (I prefer to use OpenSSH from Preware to working directly onboard the Pre).

4. In the configuration I use, Lighty has to be started after rebooting. This is what the lighty.sh script is for, in order to avoid arcane file names.

5. The lighttpd.conf configuration script goes in /opt/etc/lighttpd/

6. I also (probably unnecessarily) installed fcgi from Optware, too, so if this setup doesn’t work, try that.

7. HTML documents are in /media/internal/www/htdocs/ (note my mod of the conf file for this; also note that I softlinked ‘python2.5’ to ‘python’ in /usr/bin/)

8. CGI scripts are in /media/internal/www/cgi-bin/

9. The server can be found on the Pre at http://localhost/, and from elsewhere via the IP address of the Pre (on port 80 as usual - change the port if your port 80 is blocked).

10. Please report any issues to me at @Deegee on Twitter.

Preware Lighty: Python test HTML file


<body bgcolor=lightblue>

<h1 align=center>Test of Python on webOS</h1>
<p align=center>
<b>Dafydd Gibbon, 2011-06-18</b>

<form method=post action=/cgi-bin/pythontest-cgi.py>

JustType :) <input type=text name=instring size=100 maxlength=600 value=”“>

<input type=reset value=” Reset “>
<input type=submit value=” SEND “>


Preware Lighty: Optware Python test script

# pythontest-cgi.py (for python2.5)
# D. Gibbon
# 2011-06-18
# Also illustrating a couple of Python cgi techniques.

import cgi
import cgitb; cgitb.enable()

# CGI field transfer

fs = cgi.FieldStorage()

if fs.has_key(‘instring’):
    instring = fs[‘instring’].value
    instring = ”


def htmlinit():
    return “Content-type: text/html\n\n”


def htmlhead():
    head = “<html>\n<head>\n<title>Test of Python on webOS</title>\n</head>\n”
    head = head + “<body bgcolor=ffd0d0>\n<h3 align=center>Python says…</h3>\n<hr>”
    return head


def htmltail():
    tail = “”“<hr>
    return tail


print htmlinit()
print htmlhead()
print instring
print htmltail()