English | Lietuviškai

Info


Communication


PEROPESIS FORUM

This forum is dedicated to discussing issues related to the use and development of the Peropesis Linux operating system.

problem with apropos and whatis commands

by rosika, Wednesday, November 16, 2022, 15:39 (527 days ago)

Hi all,

my main system is Linux/Lubuntu 20.04.5 LTS, 64 bit

I´m running peropesis in a virtual machine using the command


firejail kvm --cdrom /home/rosika/Peropesis-1.8-live.iso -cpu host -m 1024 -boot d

which works well.
I looked through the page https://peropesis.org/user-manual which gives some great help.

But I stumbled over one thing:

I can´t het the apropos and whatis commands to work. The manual says:


Note: To take advantage of the whatis and apropos applications available in the Peropesis system, you must first update
man database by typing the following command at a command prompt:
$ /usr/bin/mandb


Yet this doesn´t work with me. If I enter the command /usr/bin/mandb I get the following info:


Processing manual pages under /usr/man...
/usr/bin/mandb: can´t update index cache /var/cache/man/fsstnd/336: No such file or directory
/usr/bin/mandb: warning: cannot create catdir /var/cache/man/fsstnd
/usr/bin/mandb: can´t create index cache /var/cache/man/fsstnd/336: No such file or directory


Does anybody know what´s going on here?


Many thanks for your help in advance and many greetings

Rosika

problem with apropos and whatis commands

by g, Thursday, November 17, 2022, 10:38 (526 days ago) @ rosika

Hello, Rosika,


Welcome and thank you for reporting the error you found. I noted this error and I will try to fix it in the next edition. I also want to express the idea that you also can try to find a way to solve the error, if you want, of course.


According to the error message, it appears that the 'mandb' program cannot create the directory in '/var/cache' directory. All that's left is to answer the question, what prevents the 'mandb' program from doing this?

problem with apropos and whatis commands

by rosika, Friday, November 18, 2022, 14:21 (525 days ago) @ g

Hello g,

thanks a lot for the welcome and your answer.

I noted this error and I will try to fix it in the next edition.

That´s great. Thanks for the effort.

All that's left is to answer the question, what prevents the 'mandb' program from doing this?

Well, I wish I could help you there.
Are there any log-files available that would help us finding out why that error occurs?


Many greetings
Rosika

problem with apropos and whatis commands

by g, Saturday, November 19, 2022, 09:58 (524 days ago) @ rosika

Hello, rosika,


This time I got a little more into the situation, here's:


There is installed 'syslogd' and 'klogd' programs from Sysklogd 1.5.1 package in the peropesis filesystem. These programs log system messages. As specified in the '/etc/syslog.conf' file, system messages are logged in files that are created in the '/var/log' directory. Unfortunately, program 'mandb' does not offer logging of its messages. You can check:


'ls /var/log'


Logs can be read with programs cat and less: 'cat /var/log/file-name.log | less' (when you're finished, write 'q')


So in this case you should focus on the message provided by the 'mandb' program:

Processing manual pages under /usr/man...
/usr/bin/mandb: can´t update index cache /var/cache/man/fsstnd/336: No such file or directory
/usr/bin/mandb: warning: cannot create catdir /var/cache/man/fsstnd
/usr/bin/mandb: can´t create index cache /var/cache/man/fsstnd/336: No such file or directory


I forgot to mention, that 'mandb' follows the settings described in the '/etc/man_db.conf' file. When you open this file with command: 'cat -n /etc/man_db.conf', you can see that line 66 also describes this '/var/cache/man/fsstnd/' directory. Above in this config file explains what this is for: "Each line may have an optional extra string indicating the catpath associated with the manpath". At this point it should be added, that all man pages is keeping in the /usr/share/man diretory in the peropesis filesystem. What if we try to comment this line? The 'ed' text editor can be used for this task. Example:


# ed /etc/man_db.conf
5186
66
MANDB_MAP /usr/man /var/cache/man/fsstnd
c
#MANDB_MAP /usr/man /var/cache/man/fsstnd
.
w
5142
q


After these actions, you can check (with 'cat', 'less') whether you succeeded in changing the content of the file in the desired location. And what if we tried to run the 'mandb' program after all that and then start programs 'whatis' and 'apropos'?

problem with apropos and whatis commands

by rosika, Saturday, November 19, 2022, 15:21 (524 days ago) @ g

Hi g, :-)

thank you so much for your new reply and all the time and effort you put into helping me.


I read your explanations and could follow them in my running instance of peropesis.
The second part of your post seems particularly interesting and I tried what you suggested.


I have to admit though that I didn´t make use of the text-editor ed in the past.
In fact I never knew it existed.


So I took a look at ed-command in order to get acquainted with it.
Still: your instructions are very good; I just wanted to know what I was typing...


So I changed line 66 of /etc/man_db.conf and commented out the respective entry:


#MANDB_MAP /usr/man /var/cache/man/fsstnd

After that I ran /usr/bin/mandb again and got the following output:


[...]
Updating index cache for path `/usr/share/man/man9´ . Wait...done.
Checking for stray cats under /usr/share/man...
Checking for stray cats under /var/cache/man...
9 man subdirectories contained newer manual pages.
461 manual pages were added.
0 stray cats were added.
0 old database entries were purged.


And after that: SUCCESS !!!


Both whatis and apropos commands are working.


So that´s the way to go...


Thank you very much for your help, g.


Many greetings from Rosika. :-)

problem with apropos and whatis commands

by g, Sunday, November 20, 2022, 08:11 (523 days ago) @ rosika

The user manual about ed, you mentioned is very useful. It seems to me that in the past I followed this manual for learn how to work with ed. :)


Well, that's what I think in next release of the peropesis '/etc/man_db.conf' file should appear with commented line 66. Thank you, Rosika, for your contribution to resolving the mandb in peropesis.


P.S. Unfortunate, that peropesis is live type OS, not a hard disc-writable system, because everything we change on it disappears when computer is turned off.

problem with apropos and whatis commands

by rosika, Sunday, November 20, 2022, 14:31 (523 days ago) @ g

Hi g, :-)


thanks for your post.


I am happy and honoured indeed that I could be of any help. Yet - to be honest - it´s you who provided the solution. I just followed your instructions...


I´m excited about your next release. For now I´m happy with the current version.

What I like very much about it is the speed with which the OS boots in my KVM virtual machine.


> peropesis is live type OS, not a hard disc-writable system, because everything we change on it disappears when computer is turned off.


Yes, I understand. But thanks for mentioning it again.

Thanks a lot for your help and the work you´re putting into peropesis.


Have a nice day and many greetings from Rosika :-)

problem with apropos and whatis commands

by g, Wednesday, November 23, 2022, 07:50 (520 days ago) @ rosika

Think, I should apologize, that first I suggested solving the problem on your own and then I gave myself a possible solution without waiting the result of your work.

problem with apropos and whatis commands

by sskras ⌂, Lithuania, Wednesday, November 23, 2022, 13:34 (520 days ago) @ g

I am not the original poster, but I think everything is fine.

Our time/energy is limited, and whoever gets there first, does the job.


This also reminded be of the old saying: "The early bird catches the worm." :)

Thanks for doing the fix, I might need this one too.

problem with apropos and whatis commands

by rosika, Wednesday, November 23, 2022, 14:04 (520 days ago) @ sskras

Hi all, :-)

@g :

No need to aplogize at all, g. That´s quite alright.
I´m glad for any help I can get and you helped me a lot indeed. Thanks again for that.


@sskras :

Hi. Yes, you´re right. Everything´s fine. I like this forum quite a lot as it has some
kind of family-like touch.


Many greetings to all.

Rosika :-)


Copyright © 2021-2024 Peropesis. See license terms.
E-mail: info(at)peropesis.org