Needless man files?

Please post any bugs you have found
Message
Author
User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#21 Post by 8-bit »

For those of you that might be interested in what changes I made to the /usr/bin/man script copied from Puppy 4.2.1 to get it to recognize and display online man pages
I am giving you the code I changed in the man script file.

Code: Select all

#    exec defaulthtmlviewer http://linux.die.net/man/${1}
	exec defaulthtmlviewer "http://www.google.com/search?&q=man+\"${1}\"+site:linux.die.net&btnI=Search"
The commented code beginning with # is the original line in the man script from Puppy 4.2.1. The added line is from the man script in Puppy 4.3.1 scsi.
So If you copy the man script from Puppy 4.2.1 found in /usr/bin/ to /usr/bin in Puppy 4.3.1 and make that change to the man script,
the man command from a command line should find local man pages and still be able to find online man pages.

diaeresis
Posts: 164
Joined: Wed 16 Sep 2009, 12:50

#22 Post by diaeresis »

so is this solved? because if it isn't I will put it on the bug tracker but if it is i will ignore it.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#23 Post by 8-bit »

In my case, I have the man command working properly from the command line now.
But you have to remember in this that I used the man script from Puppy 4.2.1 and did a modification to it.
So if the original man script remains unchanged, the problem will still exist.
So the best I can tell you is to try typing "man [name of program] from a command line and see if it indeed finds and displays local man pages that are in the man directories.
If you then think it needs to be addressed, go for it.

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#24 Post by trapster »

I might have the "smaller" 4.31 version. Can't remember which I downloaded.
/usr/bin/man is not a script. It is an "ELF 32 bit LSB executable intel 80386 version 1 (SYSV)"

Code: Select all

~ > man --help
man, version 1.6e

usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
        [-m system] [-p string] name ...

  a : find all matching entries
  c : do not use cat file
  d : print gobs of debugging information
  D : as for -d, but also display the pages
  f : same as whatis(1)
  h : print this help message
  k : same as apropos(1)
  K : search for a string in all pages
  t : use troff to format pages for printing
  w : print location of man page(s) that would be displayed
      (if no name given: print directories that would be searched)
  W : as for -w, but display filenames only

  C file   : use `file' as configuration file
  M path   : set search path for manual pages to `path'
  P pager  : use program `pager' to display pages
  S list   : colon separated section list
  m system : search for alternate system's man pages
  p string : string tells which preprocessors to run
               e - [n]eqn(1)   p - pic(1)    t - tbl(1)
               g - grap(1)     r - refer(1)  v - vgrind(1)
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#25 Post by 8-bit »

Thank you Trapster.
That explains why yours works.
The question here is should the replacement for the binary man file written by Barry be replaced by the binary man file?
Is this a matter of size that the binary man file got replaced by a script file or that additional features were added?
I am currently comfortable with my modified man script file.
I was just wondering why the original binary man file was replaced by a script file.

User avatar
sikpuppy
Posts: 415
Joined: Sun 29 Mar 2009, 05:54

#26 Post by sikpuppy »

8-bit wrote:I was just wondering why the original binary man file was replaced by a script file.
The mind boggles as to why. I can't think of a single good reason. I can think of some fairly ordinary reasons.

I think any script which clobbers such a key system file is unfortunate. The script is a bit of a shambles anyway, I don't really understand why any system file such as "man" would be set up to connect to the internet anyway.

Since man takes it's pages from whatever is on ones system I think perhaps if it always went to the internet, what are the chances that the page it reached would have either out of date, erroneous or even information on features that the program being "man"ed doesn't have yet?

I know why it's there I think. It's so the PET makers can strip the man pages out of their PETs. However, how much room are we talking about?
ASUS A1000, 800Mhz PIII Coppermine!, 192Mb RAM, 10Gb IBM Travelstar HDD, Build date August 2001.

thelaptopkiller
Posts: 66
Joined: Sun 25 Oct 2009, 14:23
Location: The only place in tornado ally with no tornadoes

needless man files but not needless man program

#27 Post by thelaptopkiller »

I do a lot of compiling and all of the programs i compile ether 1.puppy does not have a pet for or 2.is compile only
i am a relitive noob so i would like to read the man files.
the script wont let me
i need the man program why its not in the official release i dont know
is there and version of puppy for compilers and does it have man(the program)?


thelaptopkiller
p.s i am working on compiling dslinux
and i love puppy for that task
because of puppy i can compile it on a p3 600mh pc

thank you puppy!!! :wink:

diaeresis
Posts: 164
Joined: Wed 16 Sep 2009, 12:50

#28 Post by diaeresis »

If I use man (program name) either in a terminal or in a command prompt I get sent out into internetwebspacethingy by firefox and get a nice helpful web page devoted to whatever program name I typed.
I get the impression that this is not what man users expect to happen.
So as I am sticking stuff on the bug tracker and one more or less makes no odds to me I will whack it in and whoever looks after that side of it all can turn it into a feature request if anyone is unhappy about it being called a bug.
I hope that seems reasonable to all interested parties.
:D
I have a headache and a stinking cold. Subtle nuances are beyond me right now.
And right now I would like a simple easy uncomplicated way of turning a window into exactly half the screen and another window into exactly half the screen and both of them sitting there looking at me while I look at them. And I am sure it is easy but i have never been interested in having it like that before and don't know where to start.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#29 Post by amigo »

Puppy usually has all the man-pages removed -which I also think is unfortunate. Some systems have a local method of displaying man-pages as html which does make them easier to read, but has more overhead.

To my way of thinking, all package should come with some essential documentation -including any README files, LICENSE files and any HOWTO or man-pages.

At the very least, Puppy could use a script-version of man, but which would first check to see if the requested man-page is available on the system. if not, then it could go,looking for it online -after cehcking to see if you are online, of course. But that probably makes too much sense to be included in Puppy...

I've recently implemented package-splitting in my src2pkg program, so you can split out docs and man-pages (among other things), but my program goes *way* out of its' way(hundreds of lines of code) to make sure there are essential docs included in the main package.

Jeff -thanks so much for mentioning slitaz so long ago -I finally got around to checking out out and was so pleased to find an orderly distro, an orderly web-site, a complete repo of sources, a group of devs working together to things the right way -AAmaaayzen Gracie!

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#30 Post by technosaurus »

here is a man pet ... with no man pages lol
Attachments
man-1.6f-i486.pet
(46.23 KiB) Downloaded 472 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#31 Post by 8-bit »

Technosaurus,

I just downloaded, converted to a tar.gz, and extracted your offering in a working directory.
Upon opening a terminal to get a command line in that directory and trying it, I have found that it indeed does fine the limited man files.
But it also fails at finding .htm or .html help files. It was never designed to do that or to try to look online for help.
So therein is the reason the man script came to be.
The script works with minor modification and that modification also lets it find and display nicely formatted local man pages as well as still being able to handle the htm and html help files and then go online to try to find help for a command or program.
So the man script file was to be an improvement on the man command.
So as to me, I am going to use the script version of man with that one line modification.
I will keep your efforts around though.
Thank you for making it available to those that want it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#32 Post by amigo »

I've been toying with this (man) and texinfo for the last couple of days for my new distro i586-kiss-linux.
The big trouble with man is that it needs groff which is a pretty big package(~8MB). Same deal with texinfo(~7MB)
What I'm going to do is use scripts which will allow other programs to be used as a viewer -whether running from CLI or X. man2html piped through html2txt gets you the equivalent output of froff piped through lesspipe.sh(which is what man does). And man2html alone will obviouls give you suitable output for viewing in a browser. So it's just a matter of writing a script which figures out whether you are running from CLI or X, then whether the asked-for man-page is present and disaplying it, or looking for it on the web if you are connected.

Pretty much the same procedure for info pages -which Puppy also never installs, I think. I hate using info -in fact I have never figured out how to navigate with it! But, using a nicer viewer makes info pages useful to me -and many programs(mostly GNU projects) only install info pages.
I'm setting up to compress all man and info-pages using xz, which saves about 20-25% more space compared to gzip.

For the last several years I have used the coolman program which comes with cooledit as it makes man-pages much easier to read and search for terms. In fact, I created a package which combines coolman with another old GTK1 program for indexing/searching man-pages by category. I called the program RTFM...
You can get it here:
http://distro.ibiblio.org/pub/linux/dis ... tfm/0.6.0/

And, I hereby dedicate this program to one of its' chief proponents, AlienJeff!

I may stick with using coolman for KISS, but I'll probably patch it to use man2html insetad of calling groff as it now does.

For viewing info pages, there are several nice programs - pinfo and saxinfo among them, but there is also tkinfo and others.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#33 Post by technosaurus »

This is actually what I use as my man script in X

Code: Select all

#! /bin/bash
defaulthtmlviewer "http://www.google.com/search?&q=man+"$1"+site:linux.die.net&btnI=Search"
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

improved man script

#34 Post by shinobar »

Hi all,
attached improved man script for puppy.
extract the attached and put it as /usr/bin/man.
to look up local man page, you need man2html, which is in devx.

Code: Select all

# man --help
man for puppy linux - 09 Dec 2009
If you like to use original version of man, try '/usr/local/man'.

usage: man [section] name
if you like to use original (binary) man, which is in devx sfs at /usr/bin/man,
get it from /initrd/pup_ro?/usr/bin/man and copy it to /usr/local/man.

this man script is an improved version based on the man in 4.3.1JP(Japanese Edition), basically bilingual and potentially i18n.

User avatar
auriza
Posts: 46
Joined: Tue 06 Jan 2009, 02:32
Location: Surakarta, Java
Contact:

#35 Post by auriza »

I just want to share the fact that I know in Puppy 4.3.1:
- man command in Puppy is a script
- it searches for html files in /usr/share/doc and it's subdirectories
(e.g. if you type "man abiword" will open-up a browser showing /usr/share/doc/abiword.html)
- if you want to include manpage in your package, convert it to html with man2html command and place it to /usr/share/doc
- if you want to see those converted html manual page in console, you can edit the man script to change the browser to w3m, elinks, etc

User avatar
auriza
Posts: 46
Joined: Tue 06 Jan 2009, 02:32
Location: Surakarta, Java
Contact:

#36 Post by auriza »

This issue is very annoying for user without Internet connection.
I use CLI program in terminal frequently, and without manpage I feel lost.

@amigo
I agree with you. All packages must include man files, and other important files (README, AUTHOR, LICENSE, etc).

To open man-file in terminal, I use this command

Code: Select all

# nroff -mandoc -c manpage.n | less
Last edited by auriza on Tue 26 Jan 2010, 06:55, edited 1 time in total.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#37 Post by amigo »

I guess Puppy users could have it both ways. groff is a large set of programs, so having man installed also should not be a burden compared to the soze of groff. then, they couls simply change the name of the man program to 'real-man' -hehe.

Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places. And doing it anyway is quite against the open-source principles. People who distribute binaries without making the sources available and including the License should be forced to use Winblows freeware/shareware/proprietary stuff for a while -or they should put in soke months of hard work on a source-based program and release it with a free license (and no other restrictions) and then see how they feel when others distribute their code without including their License/copyright or alter the sources and claim it as their own work....

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#38 Post by DMcCunney »

amigo wrote:I guess Puppy users could have it both ways. groff is a large set of programs, so having man installed also should not be a burden compared to the size of groff. then, they could simply change the name of the man program to 'real-man' -hehe.
Groff itself is a whole 50K on my Puppy 4.31 installation. There are other external components it may call, but for most cases, just groff is sufficient.

And you might not even need it. Man systems tend to use the "catman" approach, where the man command cats the unformatted man page through "groff -man" to produce the formatted output on the user's screen, but it ought to be possible for the man pages to be installed already formatted, removing the need to have groff in the loop.
Leaving out man-pages is forgivable, if unwise, but leaving out the License/Copying/Copyright files is illegal in most places. And doing it anyway is quite against the open-source principles. People who distribute binaries without making the sources available and including the License should be forced to use Winblows freeware/shareware/proprietary stuff for a while -or they should put in soke months of hard work on a source-based program and release it with a free license (and no other restrictions) and then see how they feel when others distribute their code without including their License/copyright or alter the sources and claim it as their own work....
I started using Unix with AT&T System V Release 2 in the 80's, when Linux wasn't a gleam in Linus Torvald's eye. I've been accustomed to typing "man <command>" at a shell prompt and getting a locally installed man page in response. When I first installed Puppy, I said "WTF?". The man command was replaced by a script that tried to pop up a browser to view local HTML documentation, and if it wasn't there, tried to go out the the internet to display a man page in the browser from an external site.

Yeah, right. All Puppy users have an always on Internet connection and can just pop online to view docs. I'd like to live in the dream world where this was the case, but this isn't it. (And I generally am connected, but "man <command>" at a prompt displaying a local man page is almost instant. Loading a browser and going out to the net is quite the opposite on the old, slow box I run Puppy on.)

I found a pet with the real man pages and the actual man command, and a front-end that could call Barry's script for things that weren't Gnu Linux commands and didn't have man pages, and life got much better. The whole installation takes about 30MB in my system, and for me, that's a trivial amount.

For future Puppy versions, I think we should consider a package with a core install and optional packages. Boot from the Live CD, tell Puppy you want to install, and it asks questions, like "Do you want the man pages?". If you say yes, you get them. If you say no, you get what Puppy currently does. Another "Do you want..." might be Pizzasgood's multi-user support. (I just encountered a package that refuses to install if you are running as root as a security measure. I'd prefer a multi-user Puppy, and would want that as an option.)

I understand the impulse to keep things small by leaving things out. But it should be possible to add them back in when installing Puppy to make a more standard Linux system if small size isn't your biggest concern. It should not be necessary to go hunting through the forums for things like a pet package of stuff that arguably should have been there in the first place.

And these "standard Linux components left out of Puppy to save space in the distro" really need to be collected and made available as "install after the fact" packages, with a pointer on the Puppy main page to where to find them so you don't have to go hunting through the forums for pointers.
______
Dennis

User avatar
auriza
Posts: 46
Joined: Tue 06 Jan 2009, 02:32
Location: Surakarta, Java
Contact:

#39 Post by auriza »

@technosaurus
Your man package needs groff, at least in Puppy 4.3.1

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

#40 Post by shinobar »

auriza wrote:I just want to share the fact that I know in Puppy 4.3.1:
- man command in Puppy is a script
- it searches for html files in /usr/share/doc and it's subdirectories
(e.g. if you type "man abiword" will open-up a browser showing /usr/share/doc/abiword.html)
- if you want to include manpage in your package, convert it to html with man2html command and place it to /usr/share/doc
- if you want to see those converted html manual page in console, you can edit the man script to change the browser to w3m, elinks, etc
Yes auriza.
isn't this a solution?
The devx_431JPbeta2.sfs available from here contains some man pages.
it has both man2html and w3m plus improved man script.
The improved man script there looks up the man pages first if available, next look up local html, and the last look up online.
it uses man2html and the defaulthtmlviewer on rxvt, but it uses man2html and w3m from console.

the devx_431JPbeta2.sfs also have the original man program at /usr/local/man if you like to use it.

Post Reply