LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Man pages as root doesn't work (https://www.linuxquestions.org/questions/slackware-14/man-pages-as-root-doesnt-work-431200/)

vharishankar 04-03-2006 01:32 AM

Man pages as root doesn't work
 
After a lot of manual fixing, I managed to get Slackware-current working fine. However, I had to install the man and man-pages from swaret because it wasn't installed earlier.

Now man works fine as a user, but as root, it doesn't display anything. Just a blank page. I installed groff because man seems to require this, but it still doesn't work as root.

dunric 04-03-2006 03:51 AM

Quote:

Originally Posted by Harishankar
After a lot of manual fixing ...

It's hard to say what is the problem even when you did lot of manual fixing only known to you. In my experience Slackware does not need such "fixes", just editing configuration files.
I would try to remove subdirs for man cache files
Code:

rm -rf /var/man/cat{[1-9],n}/*
(there may be a problem with permissions) and reinstall man and groff package for sanity
Code:

upgradepkg --reinstall man-<version>-<arch>-<build>.tgz
upgradepkg --reinstall groff-<version>-<arch>-<build>.tgz

Concerning the cat subdirs, what permissions do they have ? Btw. they come from aaa_base package.

vharishankar 04-03-2006 04:55 AM

Those fixes were for other problems including a few dependency issues with other programs and glibc.

man does work fine as user. But when I su to root or log in as root, it just displays an empty screen. Not sure how to fix this, although it's not a major problem.

kodon 04-03-2006 06:08 AM

does strace give you any clues
as to what might be happening
under root but not user?

dunric 04-03-2006 07:50 AM

Maybe you should try what I was suggesting, maybe man tool refuses to display content of a cached file when with improper permissions, but that's only my doubt. I'm running 2 boxes with Slack current and can normaly read man pages as root.

Just another idea concerning possible wrong environment settings. Can you su to root wihtout '-' option to keep users settings and try it again ? Also check PATH, MANPATH and TERM environment variables when logged in as root. May be it has something to do with different setting of locales. Try
Code:

LANG=C LC_ALL=C man 1 man
Stracing a problematic app is also a good way if you know what you are doing.

wchild 04-03-2006 08:44 AM

Quote:

Originally Posted by Harishankar
After a lot of manual fixing, I managed to get Slackware-current working fine. However, I had to install the man and man-pages from swaret because it wasn't installed earlier.

Now man works fine as a user, but as root, it doesn't display anything. Just a blank page. I installed groff because man seems to require this, but it still doesn't work as root.

1. check your PATH (for root)
2. why would you need root privileges to read man pages ?!

vharishankar 04-03-2006 09:54 AM

Well, sometimes I su to root to do some operation and then require to check up a command. In that situation I use the man command.

Also, now I tried compiling 2.6.16 from Slackware and it doesn't work. I will have to restore grub to point to the earlier kernel before I can try out the suggestions in this thread.

Alien_Hominid 04-03-2006 10:12 AM

Issue set as root, your MANPATH should be like this:
Code:

MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/opt/kde/man:/usr/lib/qt/doc/man:/usr/share/texmf/man

vharishankar 04-04-2006 11:13 AM

Strangely problem solved. Maybe the new kernel I compiled (2.6.16) did it, but I'm not sure. Anyway, works now :)


All times are GMT -5. The time now is 06:11 PM.