|JP Vossen on 26 Dec 2010 11:28:16 -0800|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Is there a trick to install just the manpages out of a package?|
On 12/25/2010 03:00 PM, email@example.com wrote:
Date: Fri, 24 Dec 2010 20:54:47 -0500 From: John Karr<firstname.lastname@example.org> When reading manpages on my server I've realized it would often be nice to be able to pull them up in yelp or conqueror on a workstation, but my choices seem to be to install the actual package and then try to disable it from starting anything, or to search the web for the same manpage I have up on the server.
Based on what everyone else said, it sounds like there is no good "official" way. My knee-jerk reply would have been "use a web site" but you've covered that. So the only thing I can come up with is a hack:
1) Go to the server(s) and for packages of interest (e.g., xterm): $ dpkg -L xterm | grep '/man/' /usr/share/man/man1 /usr/share/man/man1/lxterm.1.gz /usr/share/man/man1/uxterm.1.gz /usr/share/man/man1/xterm.1.gz /usr/share/man/man1/koi8rxterm.1.gz /usr/share/man/man1/resize.1.gz $ zip -9 man_xterm $(dpkg -L xterm | grep '/man/') 2) Well...it depends...a) You could just go unzip them on a workstation, but that could confuse its package manager.
b) You could create a .deb. of your own, but that's probably too much like work.
c) You could unzip them someplace else, then just go in and read them using less or whatever, but that might get ugly, depending on how you have your viewer configured. (OTOH, my 'less' can directly read and render '/usr/share/man/man1/xterm.1.gz' properly because I'm using the awesome 'lesspipe' .
d) You could unzip them someplace else, then create an 'lman' (local man' alias or script to find and read the files. Trivial, untested example: man -l -Tdvi /opt/man/man1/xterm.1.gz
e) Instead of all the zipping and stuff you could do an NFS export of /usr/share on the server(s) and go from there.
Except for "e" you'd have to remember to update the docs when you update packages. Or just script a once-a-NNN process to re-zip the stuff you want, copy it, and unzip it into place. Or scp or rsync, or whatever.
If it was me, I'd probably write a wrapper script called 'lman' like: usage: lman <local man page> # Read a local man page lman -u <page> <server> # rsync a man <page> from <server>lman -U <config> # rsync pages from servers as defined in <config>, for use in a cron weekly updater
Good luck, let us know how it turns out, JP  http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html LESSOPEN=|/opt/bin/settings/lesspipe.sh %s ----------------------------|:::======|------------------------------- JP Vossen, CISSP |:::======| http://bashcookbook.com/ My Account, My Opinions |=========| http://www.jpsdomain.org/ ----------------------------|=========|------------------------------- "Microsoft Tax" = the additional hardware & yearly fees for the add-on software required to protect Windows from its own poorly designed and implemented self, while the overhead incidentally flattens Moore's Law. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug