Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#1186 - output of rc.d scripts can't be read on a white terminal

Attached to Project: Arch Linux
Opened by Aurélien Gâteau (aurelien.gateau) - Sunday, 25 July 2004, 20:03 GMT
Last edited by eliott (cactus) - Thursday, 08 May 2008, 06:39 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Very Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No


I use a white terminal with black text. When I start or stop a daemon using its rc.d script, the output can't be read because the colors are hardcoded to be white.

This can be easily fixed by editing /etc/rc.d/functions and changing C_MAIN and C_DONE to be "\033[1;0m".
This task depends upon

Closed by  eliott (cactus)
Thursday, 08 May 2008, 06:39 GMT
Reason for closing:  Implemented
Additional comments about closing:  An end user reported issue as resolved.
Reopen ticket if needed.
Comment by Indan Zupancic (i3839) - Sunday, 06 March 2005, 13:20 GMT
I just checked and this fix still isn't there, even though it seems obvious. Any reason the proposed fix didn't make it?
Comment by Simo Leone (neotuli) - Sunday, 06 March 2005, 17:17 GMT
Proposed patch to fix it makes background black for all text, leaves everything else:

--- /etc/rc.d/functions 2004-02-19 12:50:09.000000000 -0600
+++ /etc/rc.d/functions 2005-03-06 11:12:01.000000000 -0600
@@ -9,16 +9,16 @@

if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then

- C_MAIN="\033[1;37m" # main text
- C_OTHER="\033[1;34m" # prefix & brackets
- C_SEPARATOR="\033[1;30m" # separator
+ C_MAIN="\033[1;37;40m" # main text
+ C_OTHER="\033[1;34;40m" # prefix & brackets
+ C_SEPARATOR="\033[1;30;40m" # separator

- C_BUSY="\033[0;36m" # busy
- C_FAIL="\033[1;31m" # failed
- C_DONE="\033[1;37m" # completed
+ C_BUSY="\033[0;36;40m" # busy
+ C_FAIL="\033[1;31;40m" # failed
+ C_DONE="\033[1;37;40m" # completed

- C_H1="\033[1;37m" # highlight text 1
- C_H2="\033[1;36m" # highlight text 2
+ C_H1="\033[1;37;40m" # highlight text 1
+ C_H2="\033[1;36;40m" # highlight text 2


Sample of what this looks like can be found here:

It is not pretty, but since this is a rare scenario, and the complaint is readability, this fix addresses it.
Comment by Simo Leone (neotuli) - Sunday, 06 March 2005, 17:38 GMT
I have attached everything needed, sorry I forgot about attachments.
Comment by Matiss Piesins (piesis) - Friday, 11 November 2005, 17:41 GMT
it is a matter of taste, of course, but those green colors like in gentoo are not only nice, but functional as well

like this:
Comment by Evan Klitzke (eklitzke) - Tuesday, 28 November 2006, 09:19 GMT
I think that trying to propose a color scheme that suits everyone is an inherently difficult problem... I think the best solution would just be to have an option that suppresses colorized output. That way you can be guaranteed that the output will at least be readable.
Comment by cristian (fancris3) - Friday, 13 April 2007, 21:15 GMT
I change 37 with 39, example: C_MAIN="\033[1;39m" and seem to be ok for black or white terminal.
Comment by Arvid Picciani (aep) - Sunday, 08 July 2007, 19:29 GMT
i agree just using
C_MAIN="\033[1;0m" # main text
and i disagree this beeing an unimportant problem. it can archlinux even render unusable when connected from a seriell console. and yes i do that often
Comment by Arthur Danskin (wiremore) - Monday, 19 November 2007, 03:20 GMT
Any progress on this? It seems like a stupid problem with several easy fixes. A lot of people use terminals with white background. Gnome terminal has a white background by default. Thanks.
Comment by Aaron Griffin (phrakture) - Monday, 17 December 2007, 07:08 GMT
Man, here's what I hate about things like this. If your terminal's green looks bad on a white background, then change it. It's not my fault that your colorscheme looks like crap

Here's a good example of what I mean:

Regardless, I guess I'll have to fix this or people will complain more, eh?
Comment by Arvid Picciani (aep) - Monday, 17 December 2007, 08:29 GMT
Actually i'm talking about the yellow here, becouse you really _can't read_ it. It's not a matter of taste.
Aaron: awesome. mind making that public? :P
Comment by Aaron Griffin (phrakture) - Monday, 17 December 2007, 22:27 GMT
Still, the point remains. If you can't read your yellow on your terminal, modify the way the yellow looks. This request would be similar to "please fix your web page, I only have crappy fonts installed and the web page looks crappy".

There are LOTs of other scripts that use yellow (makepkg, for instance). The best I can do here is force a black background as suggested above. Would that be sufficient?
Comment by Arvid Picciani (aep) - Monday, 17 December 2007, 22:39 GMT
it would make it a readable default, wich was my main concern, but it will surely make some other people angry.
i'm glad i'm not in your position here.:P
Comment by Roman Kyrylych (Romashka) - Sunday, 06 January 2008, 11:51 GMT
forcing black background on [status] text is unnoticeable on black terminals (which most people use, I guess)
though someone with blue/pink/etc. terminal will complain (but that chance is less than for white terminals anyway :P).
Anyway with new initscripts release I think we can finally close this venerable report.

P.S.: Aaron, please post somewhere ;) (we're too lazy to write it by ourselves :P)
Comment by Aaron Griffin (phrakture) - Monday, 07 January 2008, 18:14 GMT Comment by Maciej Sitarz (macieks2) - Monday, 25 February 2008, 10:25 GMT
It looks awfull with that black backgroun, pleeese change it :)
Transparent terminals have now no point because text has background :|
Comment by Roman Kyrylych (Romashka) - Friday, 07 March 2008, 21:50 GMT
It appeared that the "fix" looks worse on transparent terminals. :-(
I know it's bikeshedding, but maybe just leave things as they were before and let's those people just override stat_* functions via the new functions.d functionality?
(or just plain old USECOLOR="no" or NoUpgrade=etc/rc.d/functions (with modified color codes).
Comment by Aaron Griffin (phrakture) - Friday, 07 March 2008, 23:04 GMT
It looks fine on my transparent terminal. Again, it sounds like your terminal color scheme looks like crap.
You people are picky as all hell. I'm going to stick with the current solution until someone else gives me a patch.
Comment by Roman Kyrylych (Romashka) - Friday, 07 March 2008, 23:25 GMT
That's just standard Linux Colors scheme in gnome-terminal *shrugs*.
I just pointed out what I've observed & you're free to take any decission you want.
This isn't deadly critical at all. ;)
Comment by Aaron Griffin (phrakture) - Friday, 07 March 2008, 23:37 GMT
Oh no Roman, I wasn't griping at you. It was more general. Time was, we had Arch users that would do things themselves. These days they want us to do it for them while satisfying 100% of users.

The purpose for this bug report was _readability_. That is a valid assertion - that some of the text is unreadable. But it being "ugly" is not really that big of a deal. Aesthetics are, sadly, not my job.

Anyone is welcome to modify colors, and do whatever they want. In fact, the functions.d feature was added for this very reason - so people can modify files without needing to merge them when new packages come out.
Comment by Paul Bredbury (brebs) - Friday, 07 March 2008, 23:44 GMT
The solution is easy-peasy - split out the color assignments to a separate file - /etc/rc-color.conf
Then people can customize just that file.

Enclosed is how it's done. I've taken the liberty of changing ;37m to ;32m so that those of us lepers with a white background can actually *see* the words - that would be a sane default, hint hint ;)
Comment by Aaron Griffin (phrakture) - Friday, 07 March 2008, 23:47 GMT
You can do this currently by placing that file in /etc/rc.d/functions.d/ - it will be sourced after /etc/rc.d/functions is, so you can override anything there
Comment by Paul Bredbury (brebs) - Saturday, 08 March 2008, 00:02 GMT
Aah, you must mean testing/initscripts. OK, that sounds fine. Now let's get back to arguing about what the *default* colors should be :)
Comment by Paul Bredbury (brebs) - Friday, 28 March 2008, 19:31 GMT
In initscripts 2008.03-4, /etc/rc.d/functions should include the following end line:


So that a custom colors file in /etc/rc.d/functions.d/ actually gets used with /etc/rc.d/ service scripts.

Then, source_functions can be removed from:

Comment by Aaron Griffin (phrakture) - Friday, 28 March 2008, 19:38 GMT
Nice catch, thanks!
Thomas, do you have a problem with that change?