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.
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
The following points should give you a clue why your custom script won’t work with byobu:
- Check if you have enabled custom scripts in byobu (press F9 in a byobu session).
- 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.
- The output of custom scripts are written to a cache file under /var/run/screen. Check what the cache files tell you.