WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can i change text mode background / foreground colors?  (Read 3325 times)

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
Can i change text mode background / foreground colors?
« 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!

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Can i change text mode background / foreground colors?
« Reply #1 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...
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11502
Re: Can i change text mode background / foreground colors?
« Reply #2 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

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
Re: Can i change text mode background / foreground colors?
« Reply #3 on: April 17, 2012, 06:24:32 AM »
The second one is more better.

Thanks!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11502
Re: Can i change text mode background / foreground colors?
« Reply #4 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.

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
Re: Can i change text mode background / foreground colors?
« Reply #5 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can i change text mode background / foreground colors?
« Reply #6 on: April 17, 2012, 11:52:04 AM »
Can't you put the setterm in one of your profiles?

Offline paskali

  • Jr. Member
  • **
  • Posts: 71
Re: Can i change text mode background / foreground colors?
« Reply #7 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!