LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-08-2002, 02:03 AM   #1
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Rep: Reputation: 30
Lightbulb terminal config


Hi there!

In normal console font olor is green, but when I login to another tty pressing
ALT+F2, so the font color is white. Here is line from mine /etc/rc.d /rc.local:
setterm -store -foreground green
What should I add ot that line so that green color will appear on all tty's?

thnx in advance!
 
Old 09-08-2002, 04:17 AM   #2
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
Not exactly what you are looking for , but it could be useful: I made a script /etc/profile.d/shell.sh in which i put:
#!/bin/bash
# Start - bash prompt colours
# Folloing lines define coloured bash prompts
# Green () for normal users Red () for root
COLOR1="\[\033[0;36m\]"
COLOR2="\[\033[0;32m\]"
COLOR3="\[\033[0;36m\]"
COLOR4="\[\033[1;37m\]"
if

[ "$UID" = "0" ];
then
# I am root
COLOR2="\[\033[1;31m\]"
fi
PS1="$COLOR2--($COLOR3\d, \t$COLOR2)--$COLOR2($COLOR3\u@\H$COLOR2:$COLOR1\w$COLO
R2)$COLOR1\\$ $COLOR4"
# End - bash prompt colours

to color the prompt, both in console and in X. If you want try it.
Hope that helps
-NSKL
 
Old 09-08-2002, 04:26 AM   #3
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
Will this script make green font color on all tty's, NSKL?
 
Old 09-08-2002, 07:58 AM   #4
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
It will make green and blue prompt on all tty's and Eterm, xterms, etc.. everywhere where Bash is running, and in case you are root, the prompthwill be RED to let you know you are ROOT. I think muhri.net has some more explantions on this, in the tips section. So the font color will not be green, but the prompt will look like this:
--(Sun Sep 8, 14:42:57)--(nskl@SlackBox:~)$ and all letters will be blue, while the brackets will be green.
Also you might want to take a look at BASH customization howto, and PS1 and PS2 environment variables. Hope that helps
-NSKL
 
Old 09-08-2002, 09:42 AM   #5
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
thnx NSKL!
 
  


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
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 02:45 PM
How to launch an app in terminal, & keep it running after I close terminal? kornerr Linux - General 7 06-24-2006 05:54 PM
How to run MP3 file thru Terminal in K.D.E or Terminal itz2000 Linux - Newbie 5 08-04-2005 09:49 PM
Alternative terminal to konsole & gnome-terminal Adony Linux - Software 3 10-08-2004 03:59 AM


All times are GMT -5. The time now is 06:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration