LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Customized Default Terminal (https://www.linuxquestions.org/questions/programming-9/customized-default-terminal-774673/)

ashok.g 12-10-2009 02:32 AM

Customized Default Terminal
 
When we open a terminal we will get the black text with white background. I can change these as fallows for example:
Code:

$ echo -e "\033[46m"
$ echo -e "\033[34m"
$ clear

this settings will be erased whenever you close or exit from the terminal. I want to make these settings by default such that when I open a terminal these customized settings must be done.
How can I achieve this?

TB0ne 12-10-2009 09:14 PM

Quote:

Originally Posted by ashok.g (Post 3786340)
When we open a terminal we will get the black text with white background. I can change these as fallows for example:
Code:

$ echo -e "\033[46m"
$ echo -e "\033[34m"
$ clear

this settings will be erased whenever you close or exit from the terminal. I want to make these settings by default such that when I open a terminal these customized settings must be done.
How can I achieve this?

Put the settings into your .bashrc or your .profile.

ashok.g 12-12-2009 03:00 AM

Quote:

Originally Posted by TB0ne (Post 3787281)
Put the settings into your .bashrc or your .profile.

When I keep the code in .bashrc I am getting what I want. But, I keep the same in .bash_profile I am not able to get it. Why?
Also, can you explain me the importance of both these files?

ashok.g 12-14-2009 01:00 AM

Also after I use the command " ls " I am getting back to my default settings rather than my customised settings. Why?

ashok.g 12-16-2009 05:04 AM

If I want to get the script run soon after I login to system where should I place this script?

MTK358 12-16-2009 09:01 AM

Quote:

Originally Posted by ashok.g (Post 3790522)
Also after I use the command " ls " I am getting back to my default settings rather than my customised settings. Why?

Because ls uses those same escape codes to color different file types differently, and then sets the color back to normal so that all your subsequent commands won't be colored like the last listed file.

It's probably a better idea to set the color scheme in your terminal emulator than using escape codes.

ashok.g 12-17-2009 12:14 AM

Quote:

Originally Posted by MTK358 (Post 3793744)
It's probably a better idea to set the color scheme in your terminal emulator than using escape codes.

How do I set the color scheme in my terminal emulator?

TB0ne 12-17-2009 09:07 AM

Quote:

Originally Posted by ashok.g (Post 3794822)
How do I set the color scheme in my terminal emulator?

You go into the settings, and change them. Without saying WHICH terminal emulator you're using, how can we give you details?? Each one is different, so find the settings menu, and look.

MTK358 12-17-2009 09:57 AM

GNOME Terminal:

Edit->Profile Preferences->Colors

Konsole (KDE4):

Settings->Edit Current Profile->Appearance

xterm:

Code:

$ xterm -bg <background color name> -fg <text color name>
Color Names: http://en.wikipedia.org/wiki/X11_colors

ashok.g 12-17-2009 11:55 PM

Thanks all for your help... :)

catkin 12-18-2009 01:23 PM

Quote:

Originally Posted by ashok.g (Post 3796264)
Thanks all for your help... :)

Does that mean you have solved the problem completely? If so, please post what you did for the benefit of anyone else having a similar problem who finds this thread (and use "Thread tools" to mark the problem solved). If not please tell us of any remaining issues.


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