Handhelds

Matchbox Window Manager
A major component of embedded Linux distributions targeted at handhelds and PDAs, such as OpenZaurus, the Ångström distribution, and even Maemo, was the Matchbox Window Manager.

The main raison d'être for Matchbox is that:
 * It is very lightweight. It consumes a couple of MB of memory and has little CPU usage.
 * It presents only one window at a time, like traditional PDA interfaces e.g. Palm OS.

Status
Its main components are as follows:

Next steps
Old panel applets; ideally these would be packaged to work properly with matchbox-panel version 2, rather than to appear in the systray etc:
 * Matchbox Panel Input Manager Applet
 * Toggles an input method on and off
 * It does actually show up in the panel, seemingly in systray (with no icon). The package was removed from the repository but can be added again if an icon can be added.
 * Worth combining this functionality with the other applet's GTK signalling to call the keyboard (which runs daemonised).
 * Matchbox Panel Screen Brightness Applet
 * Controls display brightness.
 * Untested. Should be trivial to create something similar for the version 2 panel.
 * Matchbox Panel Startup Monitor Applet
 * Monitors and notifies users of applications as they start.
 * The equivalent seems to already be integrated into Matchbox Panel version 2, but it's not clear if it's in a working state.
 * Matchbox Panel Volume Control Applet
 * Controls ALSA volume
 * PulseAudio is all the rage and succeeds esd. Perhaps we should create a PulseAudio volume control applet.
 * Battery Monitor Applet
 * Built in to the original Matchbox Panel, and an equivalent exists for version 2.
 * However, it uses apmd, which is old and not widely used any more.
 * A battery monitor applet, making use of modern interfaces, similar to the XFCE4 battery monitor, would be very useful. (Perhaps we can use the XFCE4 Battery Monitor for this purpose?)
 * Wireless Network Applet
 * Like the Battery Monitor Applet, this is also built into the panel.
 * It uses wireless tools. Modern systems use wpa_supplicant.
 * nm-applet actually runs in the systray, which supports mobile broadband as well as some other connections in addition to WiFi. wpa_gui also runs in the systray but it has no tray icon, which makes it difficult to use.

Additional desirable applets:
 * An applet to control shutdown/reboot, logging out of the graphical interface (back to some display manager?), screen-locking, etc.
 * Calendar
 * Alarm and more advanced clock
 * Screen rotation control (xrandr frontend?)
 * Shortcut to settings etc.

Active issues

 * There is an odd issue with window focus. Under some circumstances (seemingly to do with the window-switching panel applet), it will become impossible to use the mouse to select GTK widgets etc. Opening and closing windows works. (Probably remove the window-switching panel applet for now.)
 * After launching nm-applet from the systray, the panel sometimes grows in scale. This may be related to the 'allow-smaller-icons.patch' patch that was applied to it, which set small sizes to systray icons where applicable (it is a simple patch). Consider reverting the patch if this behaviour doesn't persist without the patch, obviously.
 * Currently, the X cursor is displayed; there is a command-line option for matchbox-window-manager version 2 to enable/disable this, as well as set themes etc. This is fine, given that Matchbox is best suited to handhelds with touch screens. Nonetheless, the X cursor might be unsuitable for devices with capacitive touchscreens (i.e. likely without a stylus, although devices in the Galaxy Note series have a stylus with advanced features) and no hardware keyboard. It might be worth:
 * 1) devising a method of being able to check hardware features, e.g. have some kind of interactive setup program (or pmbootstrap) create some file
 * 2) just turning off the X cursor altogether, given it should be obvious for users using styluses where the cursor is likely to be
 * The keyboard applet sends MBKeyboardRemoteToggle. This is not generic. It should call any GTK+2 or GTK+3 input method that is configured, and allow users to select the keyboard to call. This would allow one to call alternative keyboards and input methods.
 * Input methods are not overlayed on top of the current windows. In the case of input methods that don't span the whole display, this causes the empty space where the keyboard would normally span right across to not be updated. The original matchbox-window-manager had a configure flag called 'enable-alt-input-wins' which should fix this. It can be forward-ported.

The GPE Palmtop Environment
The GPE Palmtop Environment is a GTK+-based user interface for PDA devices. It's similar to OPIE (The Open Palmtop Integrated Environment) or QtMoko. GPE is designed to be extremely lightweight and small in size.

However, the last version of Debian that shipped the suite was Wheezy. The project appears to have suffered from a lack of maintainers, a trademark and copyright spat between the handhelds.org website and linuxtogo website, as well as very slow development.

The GPE code is entirely unmaintained and has dependencies which are unmaintained, for instance SQLite versions from around 2005. It also has its main configuration program running as setuid root, which presents quite a large attack surface for a simple program. It also depended on non-standard components such as /etc/timezone (this is not portable to systems not based on Debian, let alone POSIX-compliant Unix-like systems).

Additionally, certain libraries, that the suite depends on, ship with some terrible security issues, for instance old versions of sqlite.

The most immediate problems, however are with compiling the thing. Many of the packages do not link properly or make assumptions about obscure glibc functions (such as the undocumented __isleap macro in glibc's time.h).

Another immediate problem is that the homepage for GPE is now gone. The source code archives that were used came from Debian. They appear to be the latest - they shipped with Debian Wheezy, which came out in May 2013.


 * Some high-quality (?) screenshots

Status
The status of GPE and associated programs in PostmarketOS (WIP branch) is as follows:

Next steps

 * Move from SQLite version 2 to modern SQLite version 3
 * Move from gconf and xsettings to gsettings and dconf. O-hand made xsettings-daemon, a bridge between xsettings and gconf. This can be useful for GPE, as it makes heavy use of xsettings.
 * Proper GTK theme support.
 * Move to GTK+3. Reworking libgpewidget should do the trick. Getting rid of it altogether may be desirable.
 * Move from the Enlightened sound daemon (esound) to PulseAudio or similar. In fact, esdcompat is part of pulseaudio-utils. So, we can build against esd development libraries, but not actually install esd itself.
 * Fix dependencies on non-standard system infrastructure such as /etc/timezone.
 * Investigate modern replacement for the audiofile program.
 * Modern configuration program for wireless networking with privilege separation.
 * GTK programs that don't use xsettings aren't able to be configured by its theme support (as far as it appears). Enhance gpe-conf to be able to do this (or get rid of the xsettings-based theme system and just use GTK+.)
 * It might be worth pulling out gpe-su and making use of pkexec (it's polkit; but it is at least maintained and works reasonably well for the purpose of running programs as root)

Active issues

 * Sound does not appear to work. This may be device-specific.
 * Rewrite gpe-conf's passwd.c interface, as it seems to make assumptions that are incorrect about standard systems.
 * Disk space isn't reported, just system memory usage (which arguably isn't very useful anyway)
 * Battery status is not shown in gpe-conf. This appears to be because some parts of GPE are built around the old apmd system, which is now deprecated in favour of acpid. But ACPI support has to be implemented in firmware. So, the apmd might be desirable to experiment with on very old devices.
 * gpe-su always looks for the command . A really dirty solution is to patch this to say   or similar. In Alpine, update-alternatives is actually provided by the dpkg package.

Tracking PIM suite and mobile interface components
We should be able build a basic, lightweight system aimed at low-end PDA-like devices from Matchbox, GPE, and a few other components.

Pimlico Project, Sync, and miscellaneous PIM applications
The Pimlico Project was created by OpenHand as part of their Sato Linux distribution (based on OpenEmbedded-core). Sato seems primarily based on OE-core, Matchbox, and Gnome components (this is related to the Gnome embedded initiative in ~2007).


 * Sato release announcement
 * Pimlico project archive
 * GNOME on Mobile and Embedded
 * Forum post about the Pimlico suite
 * Sync support discussion page
 * Mirror of source tarballs

It is composed of the following four components:
 * Dates - a calendar application
 * Tasks - plan tasks etc
 * Contacts - make a record of contact information
 * Mystery 0.12 version
 * Sync - synchronise the applications with external sources
 * Unfortunately, OpenHand's website is now defunct, so Sync's source code appears to be inaccessible there. However, Sync appears to have been mirrored at https://git.yoctoproject.org/cgit/cgit.cgi/sync/. That being said, it's not clear if they're the same program.
 * Sync is based on the (seemingly) now-defunct (or at least dormant?) OpenSync project, so it is probably not worth porting. Other mobile synchronisation programs such as KDEConnect are probably worth looking at.

Thoughts:
 * It should be possible to make the programs use the modern Evolution data server. It currently is not possible to compile them because they use APIs that are deprecated and removed from upstream Evolution data server
 * The programs may fit in nicely with existing GNOME components e.g. Evolution mail itself.

GPE phone edition
There was also a now-defunct GPE phone edition. It provided Email, SMS, voicemail, and calling components. This could be useful.

OPIE
OPIE is an alternative to GPE. It's similarly targeted at embedded systems and is similar in function. However, it uses QT Extended (QTE), which is no longer under active development, and does not compile on more recent systems, let alone under Musl.


 * OPIE Project

QTMoko
Another alternative is QTMoko. QTMoko is similar to OPIE but they forked QTE and now use a custom patched version of QT (Itself unmaintained). QTMoko is the fork of QTE for OpenMoko handsets. The developers are looking into moving away from this in the future, though, so this is probably a viable alternative. In particular, they will at some point make QTMoko2 work on Debian Stretch, and that had similar compiling issues as on Alpine. The following pages are relevant:


 * Main conversation about QTMoko for GTA04 owners
 * Message about QTMoko potentially moving away from QTE
 * Maintained QTMoko (now at version 2)

SHR
SHR is an OpenEmbedded-based system which combines Enlightenment with the freesmartphone stack, among other things. They use the illume2 Enlightenment module to make Enlightenment fit handhelds' form factor more easily, and provide an on-screen keyboard.


 * SHR overview
 * SHR user manual

A thought: It would be useful to port Enlightenment to Alpine at any rate. It can work as an X11 window manager or as a Wayland compositor, and it is used for instance by Tizen. However, it's codebase is "interesting", particularly the EFL libraries.

Relevant links

 * Debian GPE Packaging homepage
 * Tracking status of GPE packages in Debian
 * Archived documentation for GPE
 * Archive of GPE development website
 * WIP branch
 * OpenMoko's list of distributions
 * elinux.org page on user interfaces for embedded systems
 * IpkgFind search results for GPE
 * Information about Debian on mobile
 * GPE phone edition announcement
 * OpenMoko's list of applications
 * 'Building consumer products with open source' - Insightful essay by Ari Jaaksi, Nokia's director of open source
 * 'Matchbox: Window-management not for the desktop'
 * Potentially useful tools and libraries from the FreeSmartphone project (especially apm2, which replaces apm commands with equivalent DBUS commands)