en de
visitors
today: 26
total: 19552

g19 DBus Daemon

g19 DBus Daemon or g19dd is a DBus service between libg19 (user space g19 driver) and Applications, to create applets, read special keys and to change the key backlight.

For now, it's a dirty work-in-progress project, but it works. The original name g19d (without DBus) was dropped because there are other g19 daemon projects, that do not work on top of dbus.

Details

  • The DBus "Namespace" is at.flausch.g19.
  • To read/write Values (e.g. Backlight), DBus calls are used.
  • To register and unregister applets, DBus calls are used too.
  • To access pixel data, a SHM Memmap is used.

The interface is more or less described within the dbus-interface.xml (see g19dd-src.tar.bz2). To try out methods, you could use d-feet.

Dependencies

  • a C++ Compiler
  • libg19
  • DBus
  • libglib-2.0
  • libdbus-glib-1
Precompiled:

sudo apt-get install libglib2.0 libdbus-glib-1-2

Build:

sudo apt-get install libglib2.0-dev libdbus-glib-1-dev

Applets

The easiest way to write applets is with Python and PIL, because DBus access is easy to use and PIL's performance is good enough to genereate the pixel data.

sudo apt-get install python-dbus python-imaging

Note: The pixel memory is not orderd in rows and columns but in columns and rows, meaning you have to rotate and flip the image data.

For a sample, see g19music.py. Attention: the screenshot was taken from the latest version that is still to be published. I ask for your patience. ;)

g19gui

is a python-based application to communicate with g19dd. At the moment, only the key backlight is supported.

Build

tar xjvf g19dd-src.tar.bz2 cd g19dd make CONF=Release # OR g++ -o g19dd -O3 -lg19 -lglib-2.0 -ldbus-glib-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/dbus-1.0 color.cpp main.cpp

Installation

# libg19: make all ; sudo make install # g19dd: copy the built binary (see above: "Build") sudo cp .../g19dd /usr/bin/ # allow dbus access tar xjvf g19dd-service-conf.tar.bz2 sudo cp g19dd-service-conf/g19.conf /etc/dbus-1/system.d/ # startup script (tested on ubuntu) tar xjvf g19dd-startup-script.tar.bz2 sudo cp g19dd-startup-script/g19dd /etc/init.d/ # enable autostart (tested on ubuntu) sudo update-rc.d g19dd defaults # reload dbus sudo /etc/init.d/dbus reload # or sudo service dbus reload # or whatever your distribution uses # start g19dd sudo /etc/init.d/g19dd start

Bugs

  • The set key backlight value seems to be the PWM signal, that drives the LEDs, but the different colors do not have the same brightness. 0xFFFFFF isn't white - at least not for me.

Downloads

TODO

  • Applet selector (main menu; menu-button)
  • Signals for L-Keys (up, down, left, right, OK, Back, Menu) → requires g/dbus main loop in applet
  • configure script
  • integration of dbus service conf into main package
  • macro support (G-Keys)
  • move to kernel driver?