Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mostlike colored manpages [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
frogb
n00b
n00b


Joined: 21 Sep 2003
Posts: 50

PostPosted: Sat Aug 16, 2008 8:21 pm    Post subject: mostlike colored manpages [solved] Reply with quote

I've been trying to get colored man pages using: http://nion.modprobe.de/blog/archives/569-colored-manpages.html

I did this before on another computer setup about the same but it isn't working now.

This is xfce terminal showing a man page using the most pager (which I'm trying to replace).
http://img291.imageshack.us/img291/9559/mostlc6.png

This is how it looks with less/mostlike:
http://img116.imageshack.us/img116/3928/mostlikezh3.png

Different terminals and shells show the same thing. Any idea what is wrong?


Last edited by frogb on Sat Aug 16, 2008 11:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Sat Aug 16, 2008 9:47 pm    Post subject: Reply with quote

Not an answer to your question, but I'm using vimmanpager, you could look into that.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
frogb
n00b
n00b


Joined: 21 Sep 2003
Posts: 50

PostPosted: Sat Aug 16, 2008 11:06 pm    Post subject: Reply with quote

I didn't know about vimpager but it still has problems with colors. I might try it later.

I copied /etc/man.conf from the other computer and now it works. Part of the diff is:
Code:
-NROFF      /usr/bin/nroff -mandoc
+NROFF      /usr/bin/nroff -Tascii -c -mandoc

-BROWSER        /usr/bin/less -is
-HTMLPAGER  /bin/cat
+BROWSER        /usr/bin/lynx
+HTMLPAGER  /usr/bin/lynx -dump

-COMPRESS   /usr/bin/lzma
-COMPRESS_EXT   .lzma
+COMPRESS   /bin/bzip2
+COMPRESS_EXT   .bz2

-.lzma      /usr/bin/unlzma -c -d
+.lzma     
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9711
Location: almost Mile High in the USA

PostPosted: Wed Aug 20, 2008 10:00 pm    Post subject: Reply with quote

Found a new solution to this old problem of man apparently generating illegible ANSI sequences.

Seems that the new default for nroff is to generate ANSI codes. And old systems tend to have a LESS environment variable defined to something other than the system default.

The system default is to include -R into the LESS environment variable, which will cause less(1) to interpret ANSI codes, and generate proper coloring.

Add -R to your LESS environment variable to fix the issue.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum