You are not logged in.

#1 2009-03-03 15:20:11

Painless
Member
Registered: 2006-02-06
Posts: 233

coloured manpages no longer coloured? [SOLVED]

Hi all,

I've been using coloured manpages for a while now (using LESS_TERMCAP_xx variables from the tip here: http://wiki.archlinux.org/index.php/Pos … ed_manpage) and I noticed recently that the output is no longer coloured.  It may have been going on for a while, I've only just noticed.

I've tried rebuilding "less" with --enable-termcap but that didn't seem to help.

Anyone else have the same problem?  Any solutions?


[SOLVED]
bernarcher's suggestion to edit /etc/man_db.conf worked a treat:

bernarcher wrote:

This is caused by the new man_db package. The less pager must be defined with proper options in /etc/man_db.conf.

DEFINE  pager   less -Rs

Last edited by Painless (2009-03-03 21:23:06)

Offline

#2 2009-03-03 15:31:01

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: coloured manpages no longer coloured? [SOLVED]

What is the result of echo $MANPAGER

Offline

#3 2009-03-03 15:41:00

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: coloured manpages no longer coloured? [SOLVED]

This is caused by the new man_db package. The less pager must be defined with proper options in /etc/man_db.conf.

DEFINE  pager   less -Rs

To know or not to know ...
... the questions remain forever.

Offline

#4 2009-03-03 15:46:22

thefatprecious
Member
From: Austin, TX
Registered: 2009-02-13
Posts: 98

Re: coloured manpages no longer coloured? [SOLVED]

2 ways to fix it....

Add to .bashrc

export MANPAGER='/usr/bin/most -s'

Then log out/back in. Or edit /etc/man_db.conf and uncomment the line bernarcher mentioned and change 'less' to 'most'

EDIT: At least on my system it looks like /etc/man_db.conf needs the full path so it should be /usr/bin/most

Last edited by thefatprecious (2009-03-03 15:52:55)


ILoveCandy

Offline

#5 2009-03-03 15:58:51

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: coloured manpages no longer coloured? [SOLVED]

thefatprecious wrote:

2 ways to fix it....

Add to .bashrc

export MANPAGER='/usr/bin/most -s'

Then log out/back in. Or edit /etc/man_db.conf and uncomment the line bernarcher mentioned and change 'less' to 'most'

EDIT: At least on my system it looks like /etc/man_db.conf needs the full path so it should be /usr/bin/most

That's to use the pager 'most' with man. The discussion is on getting 'less' to work colored and with man, since it's a more featureful pager smile
Thanks anyways though.

Offline

#6 2009-03-03 17:24:58

thefatprecious
Member
From: Austin, TX
Registered: 2009-02-13
Posts: 98

Re: coloured manpages no longer coloured? [SOLVED]

My bad I guess I should have clarified....The TERMCAP entries don't work for me either. Using most is a workaround for me to have pretty colors not a fix for the issue...... tongue


ILoveCandy

Offline

#7 2009-03-03 17:31:41

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: coloured manpages no longer coloured? [SOLVED]

You don't have the last groff package yet? Version 1.20.1-2 has a fix.
Otherwise just do the following which is equivalent : export GROFF_NO_SGR=1


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#8 2009-03-03 17:44:25

thefatprecious
Member
From: Austin, TX
Registered: 2009-02-13
Posts: 98

Re: coloured manpages no longer coloured? [SOLVED]

I have groff 1.20.1-2 installed and there still are no colors with less. Same result even with the env variable you suggested.

EDIT: Sorry, actually I was mistaken. You are correct, however it works only with the env variable. Thanks!

Last edited by thefatprecious (2009-03-03 17:46:36)


ILoveCandy

Offline

#9 2009-03-03 21:19:19

Painless
Member
Registered: 2006-02-06
Posts: 233

Re: coloured manpages no longer coloured? [SOLVED]

bernarcher wrote:

This is caused by the new man_db package. The less pager must be defined with proper options in /etc/man_db.conf.

DEFINE  pager   less -Rs

This worked perfectly for me.  Thanks very much.  smile

Offline

#10 2009-03-03 23:30:26

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: coloured manpages no longer coloured? [SOLVED]

Can someone tell me what the difference between man and man_db is and why man was replaced by man_db?


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#11 2009-03-03 23:35:54

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,383
Website

Re: coloured manpages no longer coloured? [SOLVED]

The main technical difference is that man-db uses a Berkley DB backend instead of the flat text backend that man used.  But for us, the main advantage is that it handles UTF-8 pages better.

Offline

#12 2009-03-04 00:53:33

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: coloured manpages no longer coloured? [SOLVED]

Allan wrote:

The main technical difference is that man-db uses a Berkley DB backend instead of the flat text backend that man used.  But for us, the main advantage is that it handles UTF-8 pages better.

Thanks a lot for the explanation. smile


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#13 2009-03-04 04:50:36

rkowalick
Member
Registered: 2009-02-22
Posts: 5

Re: coloured manpages no longer coloured? [SOLVED]

I can't seem to get colors using "view" for my manpages. I just get lots of control characters. Does anyone else use view for their man pages?

Offline

#14 2009-03-04 05:15:43

rkowalick
Member
Registered: 2009-02-22
Posts: 5

Re: coloured manpages no longer coloured? [SOLVED]

The "view" problem has been solved. In my .bashrc:

I replaced the line:

export MANPAGER="col -b | view -c 'set ft=man nomod nolist' -"

with the line:

export MANPAGER="sh -c \"col -b | view -c 'set ft=man nomod nolist' -\""

Offline

#15 2009-03-04 10:00:33

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: coloured manpages no longer coloured? [SOLVED]

Try the solution with /etc/man_db.conf
That worked for me with "most" a pager.


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#16 2009-03-04 10:16:11

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: coloured manpages no longer coloured? [SOLVED]

Slightly offtopic, but you could use this one-liner to tidy up the last remnants of the old man package:

locate -r whatis$ | grep /man/ | xargs rm

1000

Offline

Board footer

Powered by FluxBB