I have to be sudo to properly read manpages now

Greg C

Gold Member
Gold Supporter
Joined
Dec 11, 2021
Messages
13
Reaction score
8
Credits
117
Hello,
I don't know what I've done to cause this issue but now I must be sudo to properly read manpages. What I mean here is that when I call for any manpage i get a page that shows line numbers and garbage characters that reminds me of syntax highlighting etc.

I realized this situation about a month ago and thought I had somehow damaged the manpages but my attempts to correct this problem produced no joy. Today, I accidentally discovered that running a manpage as sudo produced a normally formatted and readable manpage. I've checked the various PATHS and file OWNERSHIP:GROUP (root:root) and all seems to be fine.

Any ideas?

BTW, I'm running a HP ENVY box with Ubuntu 20.04.4 LTS
Clean installation about two months ago after recovering from hard-drive crash.
Machine and applications are up-to-date with security patches and everything else that I'm aware of.

Thanks,
Greg
 


Try reinstalling the "manpages" package, so just remove them and then reinstall them.
Code:
sudo apt remove manpages
sudo apt install manpages
 
Just followed your recommendation including a reboot but to no avail. Same problem exits...
 
I forgot to thank-you for replying to my problem so fast.
 
Can you share two screenshots of what you see when opening a man page when you don't use sudo and when you do use sudo of the same page?
 
Last edited:
OK, I'll attach two screenshots that shows the "man1" manpage.
  1. Demonstrates what happens with regular user.
  2. The second screen shows when I run this as sudo.
 

Attachments

  • Screenshot from regular_user.png
    Screenshot from regular_user.png
    304 KB · Views: 160
  • Screenshot from sudo_user.png
    Screenshot from sudo_user.png
    284.7 KB · Views: 171
Nothing’s wrong there.
The root user and the standard user are using different pagers to render the man pages.
The root user is using the default pager. The user is using some other pager. I imagine that you’ve installed something, or perhaps added something to your .bashrc, or .profile that has changed the settings for the pager to use for man.

I’m not on my pc ATM. And the battery phone is low, so I can’t go into any further detail right now.
To be continued!
 
Can you share the output of the following?
Code:
env | grep -i pager
echo $PAGER
 
I've sent another screen shot that shows the result of your code:
 

Attachments

  • Screenshot from 2022-03-23 11-16-43.png
    Screenshot from 2022-03-23 11-16-43.png
    100.7 KB · Views: 163
OK, this is great and problem solved!

You were absolutely correct about the pager being the issue here. In my '.bashrc' file I changed my environment a little bit by
exporting the less pager to modify several of my alias commands and that caused the issue. I renamed that file and ran "man man" again and the results were as expected (normal manpage rendering). I'll edit '.bashrc' and be more careful this time.
 

Members online


Latest posts

Top