How to find errors in your Openbox config files

January 6, 2008

More experienced users will probably laugh at my ignorance, but I just discovered something very handy: an XML validator!

Occasionally, due to clumsiness, I mess up my rc.xml or menu.xml files. I want to add something to either of these, make some changes to the file, save it, reconfigure Openbox, and all of a sudden clicking on the desktop with any mousebutton has no effect, the window menu disappeared, I can’t switch desktops, or a part of my root menu just vanished. If I remember exactly what I added, this is easy to fix, but on several occasions it took me quite a while before I found the bad line of text. Normally the culprit is a tag that is not closed, but finding it is a pain, especially in a non-syntax-highlighting text editor like mousepad.

But I no longer need to undergo such hardships, for I have found online XML validators! Hurray!🙂 If, like me, you had never heard of such a thing before, do a search for ‘xml validator’. They basically check for errors in the structure of xml documents. The one I currently use is this one (with the “Well-formedness only” checked).

Those that helped me fix errors in my xml files in the past, and found the bad code nearly instantly, suddenly seem less god-like.😉

3 Responses to “How to find errors in your Openbox config files”

  1. K.Mandla said

    An excellent idea! I never thought of that either. …😐

  2. ikaruga said

    You can also prevent the errors in the first place by using a programmer’s IDE like Kate to edit your xml files. If you don’t want the bloat of KDE, use Emacs. Wait…emacs is bloated as well. You can also use Geany. I use all 3.

  3. john said

    I have lost info for channels can anyone help please

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s