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
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
|
Details
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.
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.
--SNIP--
--- /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
C_CLEAR="\033[1;0m"
fi
--SNIP--
Sample of what this looks like can be found here: http://neotuli.net/~simo/images/screenshot-20050306_1113.jpg
It is not pretty, but since this is a rare scenario, and the complaint is readability, this fix addresses it.
like this:
C_MAIN="\033[1;32m"
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
Here's a good example of what I mean: http://img.phraktured.net/terminals/theme-twentyfour.png
Regardless, I guess I'll have to fix this or people will complain more, eh?
Aaron: awesome. mind making that public? :P
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?
i'm glad i'm not in your position here.:P
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 colortheme.sh somewhere ;) (we're too lazy to write it by ourselves :P)
Transparent terminals have now no point because text has background :|
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).
You people are picky as all hell. I'm going to stick with the current solution until someone else gives me a patch.
I just pointed out what I've observed & you're free to take any decission you want.
This isn't deadly critical at all. ;)
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.
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 ;)
functions.diff (0.3 KiB)
source_functions
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:
/etc/rc.multi
/etc/rc.single
/etc/rc.sysinit
Thomas, do you have a problem with that change?