Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: paskali on April 15, 2012, 05:15:56 PM

Title: Can i change text mode background / foreground colors?
Post by: paskali on April 15, 2012, 05:15:56 PM
Hi, i use often text mode by append boot code 'text'; my question is simply:
how to change background / foreground colors in text mode?
i prefer, for example, white background and black foreground or green foreground and black background, etc......
Thanks!
Title: Re: Can i change text mode background / foreground colors?
Post by: gutmensch on April 15, 2012, 05:24:29 PM
text colors are defined in /etc/init.d/tc-functions as variables $WHITE, $GREEN, etc. you can of course use them to change your prompt. about the background I'm not sure there is a simple possibility without X running...
Title: Re: Can i change text mode background / foreground colors?
Post by: Rich on April 15, 2012, 09:08:36 PM
Hi zemir
Install  util-linux-ng.tcz, from the console enter:
Code: [Select]
setterm -foreground black -background white
Title: Re: Can i change text mode background / foreground colors?
Post by: paskali on April 17, 2012, 06:24:32 AM
The second one is more better.

Thanks!
Title: Re: Can i change text mode background / foreground colors?
Post by: Rich on April 17, 2012, 11:08:47 AM
Hi zemir
You're welcome. If you enter  setterm  without any parameters, you will get a list of other options.
Title: Re: Can i change text mode background / foreground colors?
Post by: paskali on April 17, 2012, 11:48:47 AM
Hi zemir
You're welcome. If you enter  setterm  without any parameters, you will get a list of other options.

Thanks, i have some other experiences with linux and tiny core and, of course, i know setterm; i would want to know if there is any kernel parameter that make possible to change colors at the console.
In the past i had compiled kernel 2.4 and 2.6 and, if i remember well, there was a choice on kernel menu to change or to make able changing colors, but i don not remember now.

I do not know kernel 3 and i do not really want to compile it.
Title: Re: Can i change text mode background / foreground colors?
Post by: gerald_clark on April 17, 2012, 11:52:04 AM
Can't you put the setterm in one of your profiles?
Title: Re: Can i change text mode background / foreground colors?
Post by: paskali on April 17, 2012, 04:26:10 PM
Can't you put the setterm in one of your profiles?

Yes, of course, but i would want to remember these kernel parameter and, i think, they may be a 'possible' alternative boot codes on text mode running.

For the rest, it is all ok!