Vala Terminal

From WebOS Internals

Jump to: navigation, search

Update 2009-07-04: Note that until http://trac.freesmartphone.org/ticket/446 is implemented or someone gets the touchscreen working under directfb, I'm working on DFBTerm DirectFB Terminal Emulator again since there is no way to specify the startup geometry of vala-terminal, and the default is unusable.


I'm working on getting vala-terminal working under DirectFB; after looking at DFBTerm DirectFB Terminal Emulator for a while it became obvious that it would make sense to try to get something already optimized for a smart phone to work, rather than trying to hack dfbterm to have those features.

1. Get GTK on DirectFB to work: http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB

2. Compile vala-terminal: http://git.freesmartphone.org/?p=vala-terminal.git;a=summary (screenshots at http://wiki.openmoko.org/wiki/Vala-terminal and http://vala-terminal.garage.maemo.org/)

3. Compile gtk for directfb (rough notes - WORKING):

apt-get install libglib2.0-0 libglib2.0-dev libatk1.0-0 libatk1.0-dev \
        libdirectfb-1.2-0 libdirectfb-bin libdirectfb-dev libdirectfb-extra

export PREFIX=/usr/gtkdfb
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig
export CFLAGS="-g"

apt-get build-dep libcairo2
apt-get source libcairo2
./configure --prefix=$PREFIX --enable-directfb --disable-xlib --disable-win32

apt-get build-dep libpango1.0-0
apt-get source libpango1.0-0
./configure --prefix=$PREFIX --without-x

apt-get build-dep libgtk-directfb-2.0-0
apt-get source libgtk-directfb-2.0-0
./configure --prefix=$PREFIX --with-gdktarget=directfb --without-x

export LD_LIBRARY_PATH=/usr/gtkdfb/lib
(initctl stop LunaSysMgr from root shell outside of chroot)
/usr/gtkdfb/bin/gtk-demo

4. Compile vala-terminal's deps and vala-terminal (rough notes - WORKING):

apt-get build-dep valac
apt-get source valac
./configure  --prefix=$PREFIX

apt-get build-dep libvte-dev
apt-get source libvte-dev
./configure --prefix=$PREFIX --with-gdktarget=directfb --without-x

# Get vala-terminal 1.1.1 tag:
lynx "http://git.freesmartphone.org/?p=vala-terminal.git;a=snapshot;h=94117f453ce884e9c30b611fae6fc19f85f98f2b;sf=tgz"
./autogen.sh --prefix=$PREFIX --with-gdktarget=directfb --without-x

5. Figure out how to bring up vala-terminal with good settings for the palm pre

6. Figure out keyboard remapping

7. Get mouse to work in directfb Note that something called "hidd" (not related to the bluetooth hidd) uses I/O, so to avoid possible issues might as well stop it as well as LunaSysMgr when playing with this:

initctl stop LunaSysMgr
initctl stop hidd

Find out what device the touchpad is, for each device in /dev/input:

hexdump /dev/input/event0
  • /dev/input/event0 = insert and remove of headphones (aka /dev/input/keypad2)
  • /dev/input/event1 = volume and silver keys (aka /dev/input/keypad1)
  • /dev/input/event2 = keyboard (aka /dev/input/keypad0)
  • /dev/input/event3 = ? - someone theorized it's when phone is close to your head, but haven't been able to get any output from it via hexdump (aka /dev/input/proximity0) - may be IR Proximity Sensor
  • /dev/input/event4 = ? - something that has slow continuous output (aka /dev/input/light0)
  • /dev/input/event5 = ? - something that has fast continuous output (aka /dev/input/accelerometer0)

So touchpad looks like it's probably not /dev/input/* related...

It looks like it's actually (duh) /dev/touchscreen - which is normally open by hidd (which also has the /dev/input/event* files open). LunaSysMgr then uses the /var/tmp/hidd/TouchpanelEventSocket file. https://fedorahosted.org/d-feet/ may be useful in figuring out the output that goes to that file, although should try the included "dbus-util --capture" first.

It looks like touchscreen is: CONFIG_TOUCHSCREEN_CY8MRLN=y (cypress touchscreen). No useful google hits, so probably a new driver included in http://palm.cdnetworks.net/opensource/1.0.1/linux-2.6.24-patch.gz - it is there:

+config TOUCHSCREEN_CY8MRLN
+        tristate "Cypress PSoC capacitive touchscreen "
+        depends on SPI_MASTER 
+          help
+          Say Y here if you have a Cypress PSoC touchscreen/controller.
+
+         If unsure, say N (but it's safe to say "Y").
+
+          To compile this driver as a module, choose M here: the
+          module will be called cy8mrln.
+

So looks like we need to wait for someone to write code to make directfb, gpm - http://unix.schottelius.org/gpm/ - (directfb can use gpm via the mouse-gpm-source configuration option), or perhaps tslib (also usable by directfb) - http://tslib.berlios.de/ , http://www.opentom.org/Tslib - or linux-input - http://linuxconsole.sourceforge.net/input/hardware.html , http://www.mjmwired.net/kernel/Documentation/input/ - work with this new device.

8. Figure out virtual kvm switch method that works (see DFBTerm DirectFB Terminal Emulator)

9. Make nice debian packages. Note that for some of the compiles, if gcc complained about X stuff not being there, I just edited the .c file and removed the stuff referencing X (this was always in some #ifdef type block, so can probably just use -D or something...)

Personal tools
Google AdSense