Having the system log on a background transparent window on the desktop look nice and can be useful (USB key plug events, network connection events and so on).
One way is to use a terminal like aterm
or Eterm
for instance using the following command:
aterm -tr -bl -ib 0 -title log -name log +sb -geometry '140x16+0+791' -e bash -c "tail --follow=name /var/log/full.log | ccze" &
With the -title
and -name
option the window decoration can be removed at the window manager level. OK, this is nice.
But when using fluxbox desktop wheeling will not work over the log as it is a window not the desktop.
So I switched to xrootconsole
, but it has no color support… not a big deal, I just hacked it in 😉
Here is a sample usage of the hacked xrootconsole
, the important part is the -A
parameter for ANSI to ccze
as the default is to use curses:
tail -n 16 --follow=name /var/log/full.log | ccze -A | xrootconsole --wrap --bottomup -geometry 233x16+1+818 &
Some details about the code’s hack are explained here.
This patch can be applied to orignial xrootconsole v0.6 source code.
Or if you are a debian (squeeze or sid) user you can install it from my personal repository.
It also has the source package so you can rebuild it (if you don’t trust my binary package) or if you are using another .deb based distribution (like ubuntu).
The full code is also available on my subversion base and on trac.
svn co http://silicone.homelinux.org/svn/xrootconsole/trunk
By the way the subversion subtree for xrootconsole is managed with svn-buildpackage
.
There is still some limitation with xrootconsole:
- The background image must be loaded before xrootconsole starts, after some browsing about it, there seam to be two solutions:
- implement pseudo transparency as Eterm and use
_XROOTPMAP_ID
as explained on the bottom of this 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. (I read somewhere but I can’t find back the link, someone describing the pseudo-transparency mechanism used by Eterm to be basically stupid and useless…) Anyway this does not allow tinting, shading, brightening or more complex image transformation above X (without new composing extension).
- It is not UTF-8 compliant, however most logs are written with the C locale anyway.
One last thing, the original xrootconsole is very low resource consuming, as the author says on sourceforge:
it should run smootlhy on a P133 laptop.
Well I don’t know if my patched version is still running on his P133, I probably should give it a try on my old P2-300MHz PC.
Awesome looking page!