DFBTerm DirectFB Terminal Emulator

From WebOS Internals
Jump to navigation Jump to search


This allows you to run a real terminal emulator on the palm pre locally. The disadvantage is that you need to stop the phone GUI first, and do a bit of setup.

These are rough notes; I plan to make this much prettier over the weekend, but of course wouldn't object if someone beats me to it.

Install and Run

1. Set up a debian testing chroot environment, and then chroot into it. You can use the debian stable chroot environment as a base, and then just upgrade to testing. 2. Set up directfb in the chroot. Be sure to include the "no-linux-input-grab" line in your "/etc/directfbrc" file. 3. Install build-essential, build-deps for directfb, and pkg-config 4. Compile lite - http://www.directfb.org/index.php?path=Platform%2FLiTE - and then dfbterm - http://www.directfb.org/index.php?path=Projects%2FDFBTerm - from CVS sources. Alternatively, grab .debs from http://dclark.us/palm-pre/dbfterm/ 5, In addition to the mounts listed in debian, you will also need to:

mount -t devpts none /media/cf/dev/pts

6. Stop the Palm GUI

/sbin/initctl stop LunaSysMgr

7. Run dfbterm

dfbterm --size=50x30

or without modifying "/etc/directfbrc":

dfbterm --size=50x30 --dfb:no-linux-input-grab


Here is a screenshot that also describes some of the work left to do:



Keyboard remapping

  • Need at least a ctrl key for this to be generally useful.
  • See notes in screenshot.


> > Unicode, there's no need to recode. You could do me a favor and
> > install the DirectFB-examples package and check if your keyboard is
> > correctly handled by df_input. This little test application should
> > show raw keyboard codes as well as the symbol associated by the kernel
> > keymap.
  • Actually want to use the below command so display isn't continually updated by the acceleramator changes (/dev/input/event2 is the keyboard only).
df_input --dfb:linux-input-devices=/dev/input/event2

event1 (keypad1) - non-keyboard keys

df_input --dfb:linux-input-devices=/dev/input/event1

Shows that:

  • volume up button = volume_up 115
  • volume down button = volume_down 114
  • power button = end 107
  • silver button = (not detected, but hexdump shows it is on /dev/input/event1)
  • vibrate/ring switch = (not detected, but hexdump shows it is on /dev/input/event1)

Note that if you don't tell directfb "linux-input-devices=/dev/input/event1" it won't use this keypad. Adding this line to "/etc/directfbrc" seems to make things just work (and you don't seem to need to explicitly include event2 as well, but it couldn't hurt)

event2 (keypad0) - keyboard keys


Make use of the touchscreen

  • Make gestures do something useful.
  • See more research into mouse stuff on vala-terminal page.

Virtual Keyboard-Video-Monitor (KVM) Switch

It would be great to be able to run DirectFB applications and LunaSysMgr at the same time, and switch between them. I haven't found a way of doing this yet, but here are the possibilities I've found so far:

Prereq to most of these would be rebuilding linux from source, which is here: http://opensource.palm.com/packages.html


Daniel Clark <dclark@pobox.com> - djbclark in #webos-internals on freenode IRC.