A GUI version of "man" for linux (ubuntu)

For PC type software that runs under some PC opsys.

A GUI version of "man" for linux (ubuntu)

Postby Doug Coulter » Sun Feb 10, 2013 6:42 pm

Anyone who does a lot of work with linux, as I do, gets fairly sick of bringing up a terminal and typing "man whatever" to get a hard to read version of the manpage for "whatever", probably using apropos "what I think it might be" first to figure out what "whatever" is in the first place.

Well, I had an itch about that, and after reading Advanced Perl Programming (rev 1), which has an example of a better way, I thought I'd roll one up. Well, there's code in the book, but it doesn't work for at least 2 reasons. One is that it depends on rman being installed in your system - and in ubuntu, it's not. The other is, it had weird path assumptions that aren't correct - for either perl itself or where the manpages are, and assumed an environment variable, MANPATH, which ubuntu doesn't set either.
At least not in 10.04, which is what I've tested on so far - and since 12.04/Gnome3/Unity/whatever desktop took away a ton of features, probably not there either.

Also, once I got over that set of problems, the thing was ugly - tiny skinny font on gray background, ugh. And a few other things didn't work, like trying it with something along the lines of Tk::Text - it barfed at the colons. All fixed up nice now.

You can put this in your /bin directory, or someplace else on your path, and make a launcher in the taskbar (that is, if you didn't get stuck with unity or gnome 3, which lost 10 years worth of customization features), and run it that way - it doesn't need a terminal, but can be called from a terminal if you want to put the name of the thing you want a manual for on the command line, like:
>gman Tk::event

Just a pleasant Sunday afternoon of messing with code that will make my life a little nicer from here on out.
First you have to install rman, which this uses to decode man files. There are a few ways. One is to say at a prompt:
>sudo apt-get install rman
Or you can use synaptic package manager, or probably the ubuntu software center. While there, you might want to fetch man pages for more stuff than is already there.

Then just say at a prompt:
>gman whatever
and up will come this program, looking good, with some features man does not have - you can search, you can jump to sections and so on, and the section headings are in a bolder font so it's easier to see them. And oh yes, you can also scroll...

gman.zip
perl script for ubuntu - GUI manpage reader
(3.42 KiB) Downloaded 311 times


Enjoy!
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: A GUI version of "man" for linux (ubuntu)

Postby Doug Coulter » Mon Feb 11, 2013 9:39 am

Nothing is ever perfect the first time! I did test this on 12.04 as well, and on a dinky laptop screen. A little work to make it shrink when you want is going to be needed, a pretty minor change, actually. So I'll get that one soon - the original I modified didn't use the feature of Tk that lets all things scale together, so shrinking this makes the input boxes go away! Not so neat.

I also noticed that the font I used doesn't render as well on this machine as the one I did the dev on. Interesting, since it's a true type font, and it's on both machines (I chose from the default list they all have). So a little tweaking there - maybe even the addition of a font specification box, is also required.

You can find out what fonts you have by saying:
>xlsfonts > fonts.txt

The redirect into a file is going to be required for you as there are too many (by far) on most machines to see on one screen - or even one scrollback - there are more than 500 on all mine. More later when I get there - I'm doing my "day job" right now.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: A GUI version of "man" for linux (ubuntu)

Postby Lars Berntzon » Mon Mar 04, 2013 11:40 am

There is also xman, very crude but X11 gui.
Lars Berntzon
 
Posts: 12
Joined: Tue Dec 11, 2012 3:21 pm


Return to PC

Who is online

Users browsing this forum: No registered users and 3 guests