Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I made a application in C. I wrote a manpage for this program and it's called something like edit.1. I "compiled"

groff -man -Tascii edit.1 | less

Now I can start it like man ./edit.1 from the main project file of the application but I want to start it like

man edit

I know that I just could put it into usr/local/share/man/man1 but the program will be used by many users who re installing the program on their own system. How can I set it up that every user can just input man edit?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Since by default /usr/local/share/man/ is in the MANPATH (see /etc/manpath.config), all users will be able to see it if you put it in that directory. However, do compress it first:

gzip edit.1

Also, there is already one man page called "edit" (redirected to run-mailcap). This will not be a problem, since /usr/local/share/man takes precedence AFAIR, but you might want to call your program something else.

share|improve this answer
    
sorry... explained it maybe confusing... it s not the users sharing the same pc which means they have to install it by themself... so at the first they will start the make and they can use the application... but make just spawns the execution file ... my question was how could man be automatically put in the directory above or if there is a other way just to call man xxx –  Fendrix Sep 21 '12 at 17:44
1  
Uh, just configure make to install your files. See the tutorial here. Create an install target, and put commands to copy (i) your executable and (ii) your man page. However that is a question for another forum. –  January Sep 21 '12 at 18:09
    
it works like putting in makefile the shell command mv editnew.1 /usr/local/share/man/man1/editnew.1 but this is dirty I guess... but anyway it works... if there is anyone to say what I have done is totally crab plse tell me also the reason as I am willing to learn –  Fendrix Sep 22 '12 at 7:51
1  
No, it's not dirty, this is precisely the way it is being done. –  January Sep 22 '12 at 8:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.