SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Rep:
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
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.