setting up man command on puppy linux

Word processors, spreadsheets, presentations, translation, etc.
Post Reply
Message
Author
xmf-149
Posts: 23
Joined: Fri 02 Aug 2013, 04:00

setting up man command on puppy linux

#1 Post by xmf-149 »

by default it comes with man which is a link to /usr/bin/pman which uses linux.die.net to look up man pages ,a related forum topic discussion is Man command broken
personally i remember briefly using openbsd but i noticed that they had xman integrated nicely into it, i like the interface. i would prefer xman and ability to save documentation from offline, also lots of packages include man files so they are already there
you can get xman from x11-apps package .download then extract only /usr/bin/xman and /etc/X11/app-defaults/Xman ,and any documentation you want
you will also need the groff-base text-formatting package for xman and libpipline for apropos search, both from Puppy Package Manager
the official puppy devx sfs is very handy so you probably already have gotten it using the install icon on the default desktop ,there is a file in it called /etc/manpath.conf that you need, to copy it you can you open and save it while it is mounted then it will persist after unmounting, this is so xman will still launch if the devx sfs is not mounted only search functions will be broken
the sfs also contains other files from the man-db package, notably mandb, apropos (and whatis) for searching. it also contains the original /usr/bin/man which i found interesting that it has a global-apropos feature to search within manpages. however xman only has an interface for apropos and it passes an extra argument that breaks it, so i suggest replacing the original shortcut at /usr/bin/man with a custom script containing only

Code: Select all

whatis $(echo "$@"|cut -f3- -d' ')
which will allow xman to use apropos when the devsfs is mounted
instead of global-apropos note that you can use something like zgrep -m1 'cat ' /usr/share/man/*/*
i use the xman command line arguments

Code: Select all

-notopbox -xrm '*verticalList: True'
to override the default settings because i find the top box very unecessary and i prefer a vertical listing of commands, alternatively you could edit the app-defaults file named earlier
to make the apropos command work (and also whatis command) you first need to run mandb to build a searchable database at the default location /var/cache/man/index.db
to make mandb work you need to add to /etc/passwd something like

Code: Select all

man:x:65533:65533:setuid man user:/usr/share/man:/bin/sh
you will need to manually run mandb after adding manpages
note you can hold the middle mouse button to drag the scroll bar
the scroll wheel does not scroll the view, it looks like there is a solution at xfree86 Bug 1008 but i dont know how to log onto their website. this affects my laptop touchpad scroll but i tried a normal mouse and i thinks the scroll was working
if you want a screenshot of xman here
i will now build a personal collection of favored or important manpages by creating /usr/local/share/man ,note that most applications use /usr/share/man but the default config files already include both paths so all you have to do is move some files there to keep them separate
note that if you use website Ubuntu manuals to look up man pages there is an easy download link provided ,you can create a mozilla bookmark to search them easily like example with keyword set to "man"
you can make man2html.sh like this, for searching and copying:

Code: Select all

a=/tmp/$(basename "$1" .gz)
if zcat -t "$1" &>/dev/null
then zcat "$1"
else cat "$1"
fi|man2html >$a.html
seamonkey "file://$a.html"
here is unmodified files from the x11-apps package and 2 files i created, just extract to / ,probably run fixmenus for the menu i created. note you still have to install 2 packages,mount the devx sfs and edit /etc/passwd which is probably unmodified from the main puppy sfs
it would be nice to have this installed on the devx sfs but i dont want to modify the official release, if so then /usr/bin/man would still have to be replaced outside the sfs for search to work
Attachments
xman-pup.tar.gz
/usr/bin/xman
/etc/X11/app-defaults/Xman
/usr/share/man/man1/xman.1.gz
/usr/bin/man
/usr/share/applications/xman.desktop
(32.29 KiB) Downloaded 213 times
:!: :!: :!:

Post Reply