Debugging Byobu

Posted on October 6, 2010
Ubuntu ships with a neat GNU screen enhancement called byobu. One of the nice features is to run custom scripts. The output of your custom byobu scripts are shown in the status line of your byobu session.

[caption id=“attachment_269” align=“aligncenter” width=“454” caption=“Byobu runs custom commands”][/caption]

I’ve converted my former screen script to run as a custom script in byobu, but it suddenly stopped working. I was wondering why and found a way to see what the problem was.

What you need

My script scans my mail directory and checks for new mail. I placed it in my home directory under:
$ ls /home/roman/.byobu/bin
3_maildircheck

Debugging

The following points should give you a clue why your custom script won’t work with byobu:
  1. Check if you have enabled custom scripts in byobu (press F9 in a byobu session).
  2. Run the custom command by itself from the plugins directory, not from your home directory. The plugins directory is located under Ubuntu in /usr/lib/byobu/custom.
  3. The output of custom scripts are written to a cache file under /var/run/screen. Check what the cache files tell you.