FS#16996 - [initscripts] 2009.08-1 colors messed up in terminal emulators
Attached to Project:
Arch Linux
Opened by Steven E. Lamberson, Jr. (lamberss) - Tuesday, 03 November 2009, 22:56 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 09 June 2010, 17:44 GMT
Opened by Steven E. Lamberson, Jr. (lamberss) - Tuesday, 03 November 2009, 22:56 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 09 June 2010, 17:44 GMT
|
Details
Description:
When I restart a service in the console, everything looks fine (i.e. exactly like it did while booting). But when I restart a service in a terminal emulator in X (such as urxvt or xterm), the colors are messed up. For example, using the default color palette for xterm (black text on white background), the text colors for the rc messages are bold white on a black background. This is annoying but readable. However, when I use my light on dark urxvt color palette (attached file "Xresources"), the result is black text on an almost black background. This text is unreadable, and I have to copy and paste it somewhere else to see what it said. IMO, the rc scripts should use the default background and foreground colors of whatever terminal environment the script is called from. I have attached a patch (attached file "function.patch") that accomplishes this on my system (it fixes the color problem in the terminal emulators, but everything looks the same as it did from the console). Additional info: * package version: 2009.08-1 Steps to reproduce: 1. Make sure USECOLOR="yes" in /etc/rc.conf 2. Start X 3. Start xterm with default colors 4. Restart a service (i.e. sudo /etc/rc.d/sshd restart) |
This task depends upon
Closed by Thomas Bächler (brain0)
Wednesday, 09 June 2010, 17:44 GMT
Reason for closing: No response
Additional comments about closing: Seems to be fine now, reopen if you don't think so.
Wednesday, 09 June 2010, 17:44 GMT
Reason for closing: No response
Additional comments about closing: Seems to be fine now, reopen if you don't think so.
FS#1186What it appears to do is turn on bold for whatever the current color is. For example, the sequence
"\033[0;36m\033[1;29m" would appear as bolded cyan (the same as \033[1;36m).
I used this in these particular cases because I needed to use "\033[0m" to set the foreground to the correct color, but there is no option to automatically set this color to bold (i.e. there is no "\033[1;0m").
\033[0m\033[1m works.
FS#1186The black background was added on purpose because it is completely unreadable _by default_ in white background terminals (i.e. gnome-terminal)
If someone can come up with a colorscheme for these messages that works out-of-the-box on both white and black backgrounds using the default colorscheme, I'd be more than happy to remove the black background.
That said, it's trivially easy to make your own custom colors for these things by copying the color section and placing it in a file in /etc/rc.d/functions.d/
The only proper solution would be to mess with the colors such that rc.d scripts output fine on a white terminal that uses the default color scheme