LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2008, 12:59 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
I started using init mode 3, is there a way to change the font color to green?


Just wondering if you can do this and how would I do it? Can you change the background color? I know you can use terminal in init mode 5 and u can do custom colors, but I don't want anything to do with the gui.
 
Old 05-21-2008, 01:33 PM   #2
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

Rather than retype this whole thing, here's a link to how to add color to your terminal without using the gui

Using Color In The Shell

Best wishes,

Mike
 
Old 05-21-2008, 03:28 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
Nice. Works great. Another question, while running init 3, how do I make full use of the monitor. It seems that the vertical margins are set too high. Only about 60 percent of the screen gets used. How do I widen up the vertical margins?

Also, on the color change, how do you make it permanent. I changed mined to green with
"/033[32m"
but after entering
ls
it went to white

Last edited by trist007; 05-21-2008 at 04:22 PM.
 
Old 05-21-2008, 04:51 PM   #4
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Check out the setterm manual page.
 
Old 05-21-2008, 08:05 PM   #5
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Sweet Glad that worked out.

I tested this on my freeBSD (Those color codes are supposed to work on any linux/unix terminal and it worked okay until I reset it - kind of silly for me to include a cut-and-paste here, since I have to fake the color, but it actually did stay green until I reset it

It's possible that this is a typo in your reply ("/033[32m") because the slash is going the wrong way.

It should stay the same color until you echo the 0m, like in my cut-and-paste below

If not, let me know what distro you're running. I'd be interested in trying to figure that one out

Best wishes,

Mike

Quote:
-bash-3.2$ echo -e "\033[32m"

-bash-3.2$ ls a
a
-bash-3.2$ ls b
a
-bash-3.2$ echo -e "\033[0m"


-bash-3.2$ ls a
a
 
Old 05-21-2008, 08:06 PM   #6
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Oh yeah,

This may or may not help, but try doing a

tput reset

also, just to reset your screen/terminal to the default settings.

Best wishes

, Mike
 
Old 05-21-2008, 08:19 PM   #7
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
I'm using Fedora 8

Yea, my mistake, it was "\033[32m"
but when I use ls it just turns white.

I tried
setterm -foreground green -store
which worked but then when I rebooted it went back to default.

I tried using tput reset and that worked in curing the ls problem, but still the color went back to white after reboot. Any idea on how to change the foreground to green permanently?

I was reading man setterm

there was an option to use
-t name of terminal to override TERM environment variables, this sounds like my answer, except I don't know the name of my terminal, bash???

so if that's the solution it'd be something like this

setterm -term bash -foreground green -store ????

do I need -store? and how do I find out what my terminal is called?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change font color xterm aeruzcar Linux - Software 3 01-04-2012 04:48 PM
How to change font color and font size in terminal ? wlaw Linux - Newbie 3 05-15-2007 08:57 PM
change the font color Drunkalot Linux - General 2 08-09-2005 10:37 PM
change the console font color minike Slackware 3 08-30-2004 05:11 PM
change font color...no NOT in X centr0 Slackware 4 05-01-2003 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration