xrootconsole

xrootconsole is a tool to display logs (xconsole) on your X background.

The upstream development seams stopped, the last release is from 2004-02-20.

However Axel Beckert relived the debian package and now we are updating it with patches.

The packaging (including the patches) can be found on debian’s collab-maint:
http://git.debian.org/?p=collab-maint/xrootconsole.git

ANSI color support

You can download the initial patch against version 0.6.
This is a patch I developed more than a year ago. But I’m going to update it.

The idea is to support ANSI escape sequences to have colored logs on the background.

Sample usage


tail --follow=name /var/log/full.log|stdbuf -oL ccze -A|xrootconsole

Notes:

  • Use ccze with -A parameter for ANSI as by default it uses curses.
  • Use stdbuf -oL to control stdio buffering otherwise your log will lag.

About the Code

xrootconsole uses a circular buffer organized in lines for managing the character to display. I added another buffer with color information (rendition options).

The rendition options are determined by parsing the text for ANSI sequence.

This parsing code and rendition information is inspired from aterm and rxvt code also from the explanations from ANSI escape code page on wikipedia.

Finally the text rendering is done by pieces of string that have the same rendition option (so the same colors)

UTF-8

That was a major limitation that stalled my work on xrootconsole, well Axel fixed it.

Other improvements

  • I just pushed a patch to detect Nautilus and display xrootconsole on it instead of the root window. So gnome users can use it too (I’m currently one, because I’m too lazy to configure something else with the features I need).
  • Fix ANSI parsing so that colortail and lwatch works.
  • ANSI color parsing is now optional with the command line option --ansi-color so users not wanting color will not get the extra processing time.
  • Detecting the background changes the Eterm way, tested with fluxbox and Gnome desktops for now.

Planned improvements and idea

  • In original xrootconsole code, the background image must be loaded before xrootconsole starts. After some browsing about it, there seam to be several solutions:
    • implement pseudo transparency as Eterm and use _XROOTPMAP_ID as explained on the bottom of Eterm Technical Reference page on eterm.org .
    • do as root-tail, don’t draw in a transparent window with a copy of the background, but directly draw on the root window. Anyway this does not allow tinting, shading, brightening or more complex image transformation above X.
    • Use some X extension to get server side transparency. (xrender ?)

One thought on “xrootconsole

  1. Pingback: Notifications of Email | Creative Capture

Comments are closed.