Manpages Issue


Forum: Apps
Topic: Manpages Issue
started by: mesmero

Posted by mesmero on May 03 2007,10:56
Hi,

i missed some man pages in DSL, so i decided to install the man pages tarball (from < http://tldp.org/manpages/man-pages-2.46.tar.gz >). Installation worked fine, but after executing "man *", i always get an error message: "This is not a BusyBox application. Error: No Data read.", e. g. after executing "man ls". Now i gave up my search for a reason. Any suggestions?

mesmero

Posted by lucky13 on May 03 2007,12:30
DSL is stripped of man pages. Busybox doesn't support man.

There are a few things you can do.

If you have a frugal install, there's a UCI in the repository.

You can try upgrading to the GNU utils (see your Tools menu to Upgrade to GNU Utils) to replace busybox.

There's also the "net-man pages" entry in the same part of the menu. You can use that or your browser of choice (with a search engine) if you're connected to the net and don't want to take up space on your hard drive with documentation that's widely available online.

Posted by mesmero on May 03 2007,13:20
The thing is, i am not connected to the internet with my laptop. I installed < gnu-utils.dsl > from a cd. Can I replace BusyBox in a different way? I mean, gnu-utils are installed already.
Posted by ^thehatsrule^ on May 03 2007,14:37
You also need to install the manpages uci for the offline ones.  (Or you can manually install them yourself)
Posted by curaga on May 03 2007,15:08
You did that already.. But man (program) is not included in gnu-utils (I think)..
You can compile it yourself from < http://primates.ximian.com/~flucifredi/man/ >
(depends on Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Make, Sed; I think everything is in DSL with gnu-utils and gcc-with-libs)

edit: didn't notice there was man.uci, get that!

Posted by mikshaw on May 03 2007,15:55
Please note that the man uci package is limited when compared to that in most "full" distributions. Some issues you may encounter...
1) The manpages themselves are quite old, and do not accurately reflect the applications available in DSL.
2) I don't recall including a writable directory in the manpath, so if you add man pages to your system you might need to tweak a little to get man to work with them.
3) Tab completion does not work, and may freeze your terminal.
4) Being in /opt, the uci does not override the original man script.

Posted by mesmero on May 03 2007,17:12
I)
Quote
You also need to install the manpages uci for the offline ones.
Did it, but i get the same result, probably the reason is =>
Quote
Being in /opt, the uci does not override the original man script.

II)
I also did that =>
Quote
You can compile it yourself from < http://primates.ximian.com/~flucifredi/man/ > .
in a similar way, look at my first entry.
III)
The issues mikshaw told me, scared me away, i let it be. Let's hope for the future.

Posted by WDef on May 03 2007,21:44
I hacked Mik's man.uci a long time ago so that it searches for man pages in the usual locations as well as in /opt.

That's why I leave man pages in my ucis eg mplayer. I was offline a lot for quite a while so it was useful.

Here's the altered man.sh in man.uci if anyone's interested:

Code Sample
#!/bin/bash

# find any uci man dirs and add to MANPATH

ADD=$(
{
if [ ! -e /KNOPPIX/bin/ash ]; then
# hd install
find /opt -type d -name man 2>/dev/null
else
find /ramdisk/opt -type d -name man 2>/dev/null
fi
} | grep -v '/opt/man' | tr '\n' : )

# Need man dirs now on system also - could be in unc extensions
MANPATH="/opt/man:/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man"

export MANPATH=$ADD${MANPATH}

echo "What manual page do you want?"
read manpage
exec /opt/man/bin/man "$manpage"

Posted by mesmero on May 04 2007,05:19
@WDef: Sounds interesting, i will give it try later and add some feedback after that.
Posted by mesmero on May 04 2007,15:53
Ok, tried it, but i have some problems. First one, how  can i hack a .uci-file?
The files in it are readonly. Second, i have no /KNOPPIX/ directory. How can i handle that?

Posted by curaga on May 04 2007,15:55
It justs checks if you have the KNOPPIX directory, if you don't it assumes you have a hd-install and searches different paths...

Mount the uci, copy all files to a writable directory, unmount the uci..

Posted by mesmero on May 04 2007,18:28
Again the same result. I repeat my steps.

1. Mounted the uci (/opt/man/)
2. Copied it to /man/
3. Replaced the man.sh
4. Unmounted the uci (There is no longer an /opt/man/.)
5. Moved /man/ to /opt/. => /opt/man/
6. Deleted /man/
7. Executed "man *" in the terminal.
=> same result

Maybe i understood something wrong, or?

Posted by mikshaw on May 04 2007,18:56
By using the command "man something", you are using the man executable found first during a path search. It is most likely the original man perl script.

If you want to use that specific command (man *) with WDef's script, that script must be found in your PATH before the perl version is found. There are several solutions to this, but I'd say the easiest would be to create an alias:

alias man='/path/to/man.sh'

However, it doesn't look like WDef's script accepts commandline parameters, so you may still need to use just "man" and then type in what manpage you want when you are prompted for it.

Posted by ^thehatsrule^ on May 04 2007,19:05
nvm :P (mikshaw beat me to it)

------

btw, if you wanted to edit WDef's scripts to accept command line args, you could do something like

Code Sample
if [ $# -ne 0 ]; then
 manpage=$@
else
 echo "What manual page do you want?"
 read manpage
fi
exec /opt/man/bin/man "$manpage"

Posted by mesmero on May 05 2007,08:12
I give it up. Did the following things.:

1. Loaded the man.uci
2. Created an alias: alias man='/opt/man/man.sh'
3. Executed man ...
=> Again error messages:

"shell-init: could not get current directory: getcwd: cannot access parent directories: No such file or directory
/usr/bin/less: invalid option --i"...

Maybe the easiest solution would be to create a man page dsl file. I am not so confident, if i beginn to hack my linux. But thanks for your supply, learned again something.

Posted by WDef on May 05 2007,19:29
It was just intended to be a replacement for the man.sh that exists in Mik's extension, so it's called from the right-click fluxbox menu and you type what man page you want.

I also put a white background to the shell that opened and increased the font size for my tired eyes when tryiing to read tiny mencoder options.

I didn't want to post a variation to Mik's uci (that's up to Mik) but I'm happy to email this hacked uci to someone somewhere, if it helps.

Posted by mikshaw on May 05 2007,20:51
Since I'm stiiiiiill stuck on dialup I don't tend to do much ongoing development of extensions that are larger than a megabyte or two (in fact I haven't even finished or updated any extensions in the last few months). Man is one of several that I've wanted to improve and update, but so far haven't touched it.  Maybe one day...
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.