LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
 
Search this Thread
Old 07-17-2014, 10:00 AM   #1
EldonCool
Member
 
Registered: Dec 2010
Location: Nevada
Distribution: Slackware
Posts: 131

Rep: Reputation: 1
How can I add a subject to man?


I just recently downloaded chipmonk basic and added the program to /usr/bin. It works great. It also had a file with it called,

basic.man.txt

I am assuming this is a page for the man function telling how to use this basic program.

So how do I get this put into the man function?
 
Old 07-17-2014, 11:10 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 137Reputation: 137
Does the file contain syntax like:
Code:
.SH NAME
man \- format and display the on-line manual pages
.SH SYNOPSIS
.B man 
.RB [ \-acdfFhkKtwW ]
 
Old 07-17-2014, 08:09 PM   #3
Lirey
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 6
If the file (basic.man.txt) is a properly formatted man page, as keefaz described, all you need to do is place it in one of the man page sub-directories. The man pages are usually located in the directory tree at:

/usr/man

The most appropriate place for a BASIC man page is probably with the general commands, /usr/man/man1. Although which directory you use is up to you.

-Lirey
 
1 members found this post helpful.
Old 07-17-2014, 08:24 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 137Reputation: 137
Could also put a man file anywhere, in /home/user/man for example and export $MANPATH accordingly
 
1 members found this post helpful.
Old 07-18-2014, 06:45 AM   #5
EldonCool
Member
 
Registered: Dec 2010
Location: Nevada
Distribution: Slackware
Posts: 131

Original Poster
Rep: Reputation: 1
The file basic.man.txt is not a man page. However when I unzipped the download of chipmonk basic one of the things unziped was directory named man. In that directory named man there was a file named basic.1.

That file is formatted with a bunch of stuff like described above. I am pretty sure it is the actual man page.

I put a subdirectory in /usr/man called basic and into that subdirectory I copied the file basic.1.
So I now have the file /usr/man/basic/basic.1 installed there.

when I enter the command ----> man basic
I get the message --> No manual entry for basic

I also tried just putting a copy of the file basic.1 into /usr/man

That did not work either.

FIXED! I copied the file basic.1 to /usr/man/man1 like Lirey advised.

Now the command "man basic" works!

One thing I notice though is that all the other files
in that directory have names like *.1.gz
basic.1 is the only one not zipped apparently, but it still works.

Last edited by EldonCool; 07-18-2014 at 06:59 AM.
 
Old 07-18-2014, 07:26 AM   #6
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,162

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
You may be interested in looking at the macros to format man pages:
Code:
man 7 man
These macros are for nroff/troff and groff document formatting utilities (pretty much every man page is written with these macros).

It's useful if you're adding "local" software -- where local means your home directory or /usr/local -- to create a standard man tree something like this
Code:
su -
cd /usr/local
mkdir man
cd man
mkdir man1 man2 man3 man4 man5 man6 man7 man8 man9
(or do the same thing in your /home directory, just don't do it as root).

Software packages you build from a download typically defaults to /usr/local. This is not a bad thing, in fact, it's a good thing. When you do make install the package, generally with manual page(s), it gets installed in /usr/local (unless you've overridden it).

You can add additional trees to the MANPATH environment variable in your ~/.profile file (or ~/.bashrc or whatever) with something like
Code:
export MANPATH=${MANPATH}:/home/yours/man
(/usr/local/man is usually defined by default). You only need to define the base man directory, not the individual sections -- the man utility will search all of those automatically.

Hope this helps some.
 
1 members found this post helpful.
Old 07-18-2014, 01:19 PM   #7
calrogman
LQ Newbie
 
Registered: Mar 2014
Distribution: Slackware!
Posts: 9

Rep: Reputation: 3
Hi, since you're not using the package tools, you should install basic in /usr/local/bin rather than /usr/bin. Also, the chipmunk tarball includes a file, man/basic.1 which you should install to /usr/local/man/man1.
 
1 members found this post helpful.
Old 07-18-2014, 01:41 PM   #8
EldonCool
Member
 
Registered: Dec 2010
Location: Nevada
Distribution: Slackware
Posts: 131

Original Poster
Rep: Reputation: 1
Thanks tronayne and calrogman. Some good info there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
amavisd-new doesn't add 'spam' notifications to the subject ridingthestorm Linux - Server 13 07-11-2014 02:51 PM
Sendmail: Add Sensitivity flag if subject contains "Password (reset|gereset)" Mik3yZ Linux - Software 1 05-13-2013 01:43 PM
Add meaningful title / Subject line to new Community Bulletin Board & Archives digital8doug LQ Suggestions & Feedback 2 11-23-2006 10:38 AM
Add more sections to man pages Ephracis LQ Suggestions & Feedback 3 06-02-2005 02:20 PM
add man path alaios Linux - General 2 03-14-2004 09:45 PM


All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration