Man Pages for X

If you use the Linux command line a lot you know the value of man (that’s man as in manual, not as in a guy). But I do find it annoying that when I quit paging through man’s output, the output disappears. Of course, you could fix this by changing the pager, but what I really wanted was a way to just have a “help window” show up that I could refer to while I was typing. Of course, there is the venerable xman, but it is a clunky old X application with a poor interface.

I noticed manview the other day in the repositories (part of manedit). I installed it (on Hardy it shows up under Development, but your milage may vary). Of course, then you have to remember to type manview instead of man — and I’ve been typing man for nearly 30 years.

So here’s the latest two entries in my ~/.bashrc:

  alias man=xman

 xman ()
    if [ -z "$DISPLAY" ]; then
        'man' $@;
        manview $@ &

This way when you type “man” from an X-Window shell you get the GUI but over a non-X shell you get good old fashioned man (be sure your shell function quotes man or you’ll get an endless loop thanks to the alias). Of course, you need to make sure manview is installed (for example, sudo apt-get install manedit).

2 thoughts on “Man Pages for X

  1. I have always gotten a few spam comments, but recently the number has skyrocketed. I’m trying a new spam filtering comment system that should take care of things. I hope.

Leave a Reply