You are not logged in.

#1 2004-02-26 18:22:42

jlowell
Member
Registered: 2003-08-10
Posts: 270

Changing Color Of Console Font

I've googled and schmoogled, man-paged and schman-paged and can find nothing on how to change font color in the consol, not in an x-terminal or eterm or the like but in the console you have available at run level 3. The command, setfont, will get you a new font but won't change your color. We have no man page for consolechars so the Linux Cookbook provides no help either. In a cul de sac and can use some help, kindly.

jlowell

Offline

#2 2004-02-26 18:24:40

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Changing Color Of Console Font

You have to set it in your prompt (bash's is usually PS1).  Just don't set the colour back to white at the end of the line.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#3 2004-02-26 18:26:59

wakeupbomb
Member
From: Liverpool, UK
Registered: 2004-02-15
Posts: 164

Re: Changing Color Of Console Font

I use this in my .bashrc

export PS1='[ [33[01;31m]t[33[01;34m] :: [33[01;32m]u[33[00m]$[33[01;32m]h[33[01;34m] :: [33[01;32m]w [33[00m]] 

Stole it from gentoo forums, looks pretty good...sometimes.
I don't understand it...but well.

Offline

#4 2004-02-26 18:43:58

jlowell
Member
Registered: 2003-08-10
Posts: 270

Re: Changing Color Of Console Font

Thanks, Xentac and wakeupbomb.

So this is an ANSI sequence in PS1? Interesting. I thought for sure that there was some kind of utility that would set this for you but no soap.

Regards.

jlowell

Offline

#5 2004-02-26 19:27:05

jlowell
Member
Registered: 2003-08-10
Posts: 270

Re: Changing Color Of Console Font

Back again. Where is the color of the default console font set, like the font itself, in the kernel? You can change the console font color via PS1 but that's for text only, eh? The cursor color doesn't change nor does text in the init sequence. If the default color for the font were reset a priori in the kernel, these too would change, would they not?

jlowell

Offline

#6 2004-02-26 19:37:09

wakeupbomb
Member
From: Liverpool, UK
Registered: 2004-02-15
Posts: 164

Re: Changing Color Of Console Font

Maybe if you set the bashrc for root as opposed to user? I dunno
Wish I knew the answer to this actually, i'd like a colour boot up
It's google time

Offline

#7 2004-02-27 06:04:43

jlowell
Member
Registered: 2003-08-10
Posts: 270

Re: Changing Color Of Console Font

wakeupbomb,

Maybe if you set the bashrc for root as opposed to user? I dunno
Wish I knew the answer to this actually, i'd like a colour boot up
It's google time

Earlier, I'd spent considerable time trying to figure out how to colorize just the console cursor. The best that I could obtain from hours of various mailing list questions and googling, etc. was a reference to /usr/src/linux-2.4.21/Documentation/VGA-softcursor.txt which provided a start on the question. The documentation provides some instructions on how to change the cursor's colors but relates it to nothing tangible! I guess you have to write to the authors to learn more, but tell me if you will if you can make more sense out of this file than I can. Great instructions with no connection to the reality of the matter. Some people, really? roll

Regards.

jlowell

Offline

#8 2004-02-27 16:50:47

Egil.B
Member
From: Universitas Osloensis
Registered: 2004-02-14
Posts: 116

Re: Changing Color Of Console Font

I use

user: PS1="33[1;32mu@h33[1;34m [W]33[1;32m $33[0m "
root:  PS1="33[1;31mu@h33[1;34m [W]33[1;31m #33[0m "

8)

Offline

#9 2004-03-08 13:54:17

slyski
Member
From: Cheese Head Land
Registered: 2004-01-11
Posts: 60

Re: Changing Color Of Console Font

take a look at setterm

setterm will change the colors of foreground and background
but only at the console, not in xterm in xwindows

slyski


Joey: If a cow passes away from natural causes can I eat it.
Pheobe: Not if I get there first.

Offline

#10 2004-03-08 16:47:18

jlowell
Member
Registered: 2003-08-10
Posts: 270

Re: Changing Color Of Console Font

Thanks, slyski.

That's precisely what I'm hoping to do, control console color, not color in a terminal brought up within the X Windows, say xterm or Eterm, that I already know how to do. I took a look at the setterm man page; it appears that I'll be able to do what I want with this command. Thanks, again.

jlowell

Offline

#11 2004-03-14 01:36:49

arthur_mueller
Member
From: Germany, RLP, Frankenthal
Registered: 2004-03-07
Posts: 18

Re: Changing Color Of Console Font

and what about xterm's background and foreground color? where can I set this? in termcap?


I'll sleep when I'm dead

PGP pubkey on keyserver.net

Offline

#12 2004-03-14 19:40:58

slyski
Member
From: Cheese Head Land
Registered: 2004-01-11
Posts: 60

Re: Changing Color Of Console Font

first take alook at man xterm if you haven't already.

there must be a million settings to send to the command line.

i would put this in my .bashrc file as an alias as per example:

alias xterm='xterm [option] [option] [option]'

if you can modify the link that is opening xterm from say the menu item you must do the same.

slyski


Joey: If a cow passes away from natural causes can I eat it.
Pheobe: Not if I get there first.

Offline

#13 2004-03-14 20:02:25

andy
Member
From: Germany
Registered: 2002-10-11
Posts: 374

Re: Changing Color Of Console Font

I, too, usually create menu shortcuts or the like to start xterms etc. with customized color settings.

However, for a more generic/default solution one should go for the xresources mechanism. It's one of the oldest ways to configure and "theme" X-applications (that adhere to this mechanism). But in the days of Gnome and KDE this is no longer used that much anymore. I myself am not really using it either ;-) ... (see xrdb(1) for a start)

Offline

#14 2004-03-14 21:01:19

slyski
Member
From: Cheese Head Land
Registered: 2004-01-11
Posts: 60

Re: Changing Color Of Console Font

i agree with you andy

i found back in the days of rehat 5.2 when i was using fvwm and more recently icewm that i
found going into the background (sometimes i call it the basement  smile  ) to change settings like
that.

i believe that joint from redmond changed all that  wink  .

slyski


Joey: If a cow passes away from natural causes can I eat it.
Pheobe: Not if I get there first.

Offline

Board footer

Powered by FluxBB