Odi's astoundingly incomplete notes

New entries | Code

line wrapping with xconsole

I am using xconsole to display the syslog. I was annoyed that long lines from iptables went offscreen because they are very long. Now fortunately xconsole is an old-school X11 program. According to its man page it uses the Athena Widget Set. X11 programs accept so called Xresources, which to an X11 GUI are nothing more than what CSS is to HTML.

The Xresources file is in your home directory: ~/.Xresources
There is another old-school program editres to graphically inspect and edit Xresources. Using that it's easy to find out that the resource we want to modify is
xconsole.text.wrap. However this doesn't tell us what kind of values this resource acccepts.

Taking a look at the Athena documentation on page 95 we quickly find that the only 3 values are never, word and line and what they do.

So firing up vim and putting the following line into our .Xresources file will do the word wrapping trick:
xconsole.text.wrap:     line
xconsole*font:  fixed
Sometimes it's worth not to forget the old school...
posted on 2010-10-10 19:46 UTC in Code | 0 comments | permalink