Re: Modify setterm color palette
From: Jan Engelhardt
Date: Sun Jan 15 2006 - 16:13:11 EST
>> > drivers/char/vt.c: default_red, default_grn, default_blu
>> >
>> > You can also change them with `echo -en "\e]PXRRGGBB"`, where X is a hex
>> > digit (range 0-F), and RGB are the components. Check console_codes(4) and
>> > go figure. :)
>>
>> I for one prefer the standard VT100 yellow instead of brown, and I
>> have an escape sequence to do that similar to the one you show above.
Cool. I prefer "purified" colors, i.e. {0x00,0x00,0xFF} instead of
{0x55,0x55,0xFF} for brightblue. :D
>> However, there's one major flaw - programs recently (and by that I mean
>> FC2-like recently) have started to do complete console resets, which
>> result in the users settings being completely wiped out.
>> So, in essence, this is a completely useless solution. I think we need
>> a separate escape sequence to modify the system default so that peoples
>> preferences do not get inadvertently wiped out by programs.
>
>Why not add an escape sequence to lock/unlock the palette ? It might be
>simpler, and we could even stack the locks to ensure recursive protection.
How about putting it into /sys...
Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx>
Applies with fuzz 2 because my values for default_blu are already modified
and not the same as 2.6.15.
diff --fast -Ndpru linux-2.6.15~/drivers/char/vt.c linux-2.6.15/drivers/char/vt.c
--- linux-2.6.15~/drivers/char/vt.c 2006-01-15 21:29:12.000000000 +0100
+++ linux-2.6.15/drivers/char/vt.c 2006-01-15 22:07:22.225060000 +0100
@@ -916,6 +916,10 @@ int default_grn[] =
int default_blu[] =
{0x00,0x00,0x00,0x00,0x80,0xaa,0xaa,0xaa,0x55,0x00,0x00,0x00,0xff,0xff,0xff,0xff};
+module_param_array(default_red, int, NULL, S_IRUGO | S_IWUSR);
+module_param_array(default_grn, int, NULL, S_IRUGO | S_IWUSR);
+module_param_array(default_blu, int, NULL, S_IRUGO | S_IWUSR);
+
/*
* gotoxy() must verify all boundaries, because the arguments
* might also be negative. If the given position is out of
#<<eof>>
Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
| jengelh's site, http://jengelh.hopto.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/