Red Hat :: Changing Bash Color Prompt?

Mar 24, 2010

I was attempting to change the bash shell color prompt on my RHEL / CentOS 5 server. When I login as my user account on my server I can see my 'PS1':

Code:
[carlos@srv1 ~]$ echo $PS1
[u@h W]$

I want to change my PS1 to:

PS1='[e[1;32m][u@h W]$[e[0m] '

When I look in ~/.bashrc, I don't see my 'PS1' line so I am confused and wondering how I do this on RHEL / CentOS systems.

View 2 Replies


ADVERTISEMENT

Debian Configuration :: Change Prompt Color In Bash Shell?

Jan 13, 2010

I am getting more and more comfortable working with the shell, thus I would like to change its prompt color to my liking, as it will be easier for me to distinguish commands vs. outputs.

I've read a couple of instructions of how to change the .bashrc file and am familiar with what the codes in PS1 mean. Except, this file can be intimidating to newbie eyes.

Where exactly on the file is it that I need to make the change?

Here is what I am trying to do. I would like my prompt to like exactly like the prompt I use in Backtrack - which consist in two different colors, one for the host and another for the pwd. Here is what the Backtrack .bashrc file looks like:

# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/local/share/man:/usr/bin/man:/usr/share/man
export HOSTNAME="`cat /etc/HOSTNAME`"

[Code]....

I also read that in order to have the same results when I log in as root, I will have to copy the modified .bashrc file into /root

View 8 Replies View Related

Programming :: Changing Color Of Output From Bash Script?

Apr 22, 2010

I am writing a bash script that utilizes the output of another script (which I will refer to as script#2.) Script#2 is not owned by me, I cannot modify it. All of the output from script#2 is blue, which makes it difficult for me to read.

I would like to have the output of it changed to grey. Is there a way I can do that in my script? A command I can pipe the output to?

Edit: One other question related to this. I put a trap function in my script that works well. Script#2 essentially runs a tail -f. When I ctrl+c to stop it, it stops script#2 and never calls the trap in my script. Is there any way I can work around that?

View 3 Replies View Related

Programming :: Bash : Searching For Info And Changing The Color Of Keywords In The Results?

May 5, 2011

(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:

Quote:

#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)

[code]....

*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.

View 4 Replies View Related

Red Hat :: Command Line Prompt But Not The Correct Bash Prompt?

Feb 2, 2011

I'm running Red Hat Linux 5.4 on HP DL580 server with 16 processors and 64 GB of RAM. I'm connecting to the server remotely through SSH. after entering the password, it takes time to return the command line, if I click ctrl+c during this time, I'll have the command line prompt but not the correct bash prompt (I have to run bash to pass to my correct prompt).I tried to install Apache on the server, ./configure took 4 hours to finish instead of 1 or two minutes, Oracle installation same behavior. Server Disks are mirrored using RAID controller.

View 6 Replies View Related

General :: Coloring The Z Shell But Don't Color Prompt

Mar 7, 2010

Because I have to stare at my command prompt all the time on my computer, it should look at least half-decent, so I am trying to get it colored. The expected outcome is as seen on this site. I have the colors I want set in my .Xdefaults file, but they of course do not color my prompt.

[Code]....

View 1 Replies View Related

Ubuntu :: Changing Task Bar Color?

Jun 25, 2011

Just upgraded to Lubuntu 11.04. Holy mother of God, the default theme is an atrocity. It looks like somebody puked blue on my desktop. I changed the theme but cant figure out how to change the color of the task bar on the bottom of the screen.

(On a completely unrelated note, Firefox now thinks Im British and wants to change color to colour....weird.)

View 4 Replies View Related

Fedora :: Changing Color Of Title Bar Of Windows In F15?

May 26, 2011

I'm playing with the system now and I have some questions. I wasn't able to find answers to some of them on this forum or the net.

My first question doesn't necessarily lighten me as someone with deep personality: how do I tweak the color of the title bars of the active and non-active windows in Gnome 3?

View 4 Replies View Related

OpenSUSE Hardware :: Changing Color Depth In 11.4 KDE?

Apr 5, 2011

1. Identify what my current color depth setting are? (default opensuse 11.4 KDE install)

2. How do I change it? Am assuming it is set to 32bit now, would like to set it to 24.

The reason is my little netbook really burns up when i play a video.. acer aspire one and one of the reason why I installed linux over windows 7 was that I wanted my laptop to run faster ... apart from the fact that I would have installed suse anyways!!

View 2 Replies View Related

Ubuntu :: Changing The Color Of Terminal Cursor?

Feb 2, 2010

Is there a way to change the color of the blinking cursor without changing the color of the text?

Or, if this cannot be done in gnome-terminal, is it possible in another terminal (yakuake, etc) ?

View 4 Replies View Related

Ubuntu :: Changing The Window Border Color?

Mar 21, 2010

I have been struggling to change the border color of the windows on Ubuntu without actually changing the theme (e.g., Keeping the "Human" theme, but having the frame borders be a different color than orange.) I have searched Google for some help, but found nothing that works. I have gone to System > Preferences > Appearance and set the 'Selected Items' color [URL] but to no avail. Only the controls changed color, not the window borders.

View 8 Replies View Related

Ubuntu :: Changing The Color Depth From Whatever It Is Now To 24bit?

Dec 29, 2010

I am trying to create a media server, and I decided to try out Ubuntu, but I'm having trouble figuring this out. I have taken a suggestion that I got from another forum, but it did not work.

I'm using version 10.4 and I have to get it to at least 24 bit so I can run XBMC. I have a friend that works for red hat and he said I needed to find the restricted driver or something, but I can't find it, and he doesn't know where it might be on Ubuntu. So, does anyone know how I can change my color depth to 24bit?

View 1 Replies View Related

General :: Changing Cursor Color In Gedit?

Dec 31, 2010

I am working with scientific linux 4 with specification Linux localhost.localdomain 2.6.9-67.EL.cernsmp #1 SMP Wed Nov 21 16:22:33 CET 2007 i686 i686 i386 GNU/Linux. How can I change my cursor color from black to green in gedit

View 5 Replies View Related

Software :: Changing Font Color In CSS File

Apr 27, 2011

I am working with a template.css file, and I want to change the color of the font in part of the header from black to blue. Is there syntax that can be inserted into the file to accomplish this?

View 14 Replies View Related

Red Hat :: Changing Cursor Color In Gedit In Gnome

Jan 4, 2011

I am using Scientific linux 4 cern with the following configuration: Linux localhost.localdomain 2.6.9-67.EL.cernsmp #1 SMP Wed Nov 21 16:22:33 CET 2007 i686 i686 i386 GNU/Linux I want to change the cursor color from black to green in gedit in GNOME. How can I do this? Chnging fomt color doesnot work.

View 1 Replies View Related

Ubuntu :: Changing Gtk Slider Color On Scrollbar Hover?

Sep 12, 2010

I'm using the Human-Clearlooks theme on Lucid (Gnome) with compiz/nvidia driver.

I'd like to have the scrollbar sliders a bit (only) more visible. Ideally, it would switch orange when I hover it with the mouse, and stay gray otherwise. This is because my screen is quite large, and when the slider is small I find it difficult to find its position.

1. I opened the gtkrc file and set colorize_scrollbar = TRUE in the engine "clearlooks" block. Now the scrollbar sliders are always orange. I'd really like to have them orange only on hover.

2. There is a "clearlooks-scrollbar" style. I tried adding (fg|bg|base|text)[] in it. I found that:A. fg[] is for the arrow within the top and bottom square boxes

B. bg[NORMAL] and bg[INSENSITIVE] define the color of the box containing the arrow (or if colorize_scrollbar = FALSE, the color of the whole scrollbar, including the square boxes and the slider itself)

C. bg[PRELIGHT] is the color of the box containing the arrow when hovered

D. bg[SELECTED] is the color of the slider (permanent)As it was most unsuccessful, I tried to force the murrine engine for the scrollbars only. Now with bg[PRELIGHT] = @selected_bg_color I get something fairly close to my expectations.

Only I'd like the bar to be pre-lighted not only when the mouse is over the slider, but as soon as it is over the scrollbar. Here I must say I'm at loss, and I really can't find how to do it.

how to change the slider color on scrollbar hover?

View 6 Replies View Related

Ubuntu :: Changing Panel Color Independent Of Theme?

Oct 17, 2010

does anyone know how to change the panel colors independent of theme? I like the theme I am on, but I want to lighten up my panel colors a little to contrast morwith my background.If you are wondering, I tried gnome-color-chooser and I cannot figure out how to change every panels color with that in 10.10; just parts of panels.

View 2 Replies View Related

Ubuntu :: Changing Gnome-panel Text Color?

Mar 22, 2011

I have a theme that looks like this.

Unfortunately, it makes the globalmenu and clock applets disappear on my gnome-panel. My panel is set to system theme, though when I choose a solid color I can get the hidden text to show up. I want to preserve the system color so I need to change the text color somehow. Also, I don't know why it uses that bluish color when clicked on since I never defined such a color in the appearance settings.

View 5 Replies View Related

Ubuntu :: Changing Applet Indicator Popup Color?

Jun 18, 2011

Is it even possible to do this? I cant find any files or settings in the themes folders. What I want to do is change the ugly grey/black popup in the top right to a different color and change the font color as well. This is 10.04 Netbook Remix.

View 2 Replies View Related

Ubuntu :: Changing The Color Of The Panel Menu Background?

Jun 25, 2011

I know how to change the colors of the panels. But on the parts were the ubuntu symbol, the menus (Applications, Places, and Systems), the date and time, and the indicator applets is, they do not change at all. And pretty much the same problem on the bottom panel.

I tried Gnome color changer but only works for the texts and the drop down menus. I use Gnome classic (hated Unity). My goal is to make ALL of the panel background black.

View 9 Replies View Related

General :: Changing Color Of Console Permanetly To Green

May 17, 2009

I am bored of watching the same white color on my console and want to change everything to green color including the start up.I did something like this Code: setterm -background black - foreground green -store It did change the color but not permanently.

View 4 Replies View Related

Ubuntu :: Change The Color Of The Background In Window Without Changing Themes?

May 19, 2010

I want to change the color of the background in this window (see screenshot)without changing themes. Whats the best way to do this?

View 9 Replies View Related

OpenSUSE Install :: Changing Font Color During Boot Screen - Not GRUB - Not KDM

Jan 24, 2010

I am testing some boot splash screens but the ones I like most are darker and therefore the black font color during boot, well, shows on dark grey or black background, so I can't see.

I would like to change the font color of the messages, but not the results (green=DONE, red=FAILED, etc., I don't want to change that, only the messages like "doing fast boot", "Loading CPUfreq", and all the ones loading stuff, mounting, etc.).

Apparently I need to edit /lib/lsb/init-functions?

I found a few examples on google, mostly for debian based and the ones I have seen are far more complex than the very simple one opensuse uses. So I am stuck here. 11.2 version.

View 5 Replies View Related

Programming :: Virtual Accounts - Changing The Prompt?

May 21, 2011

I need to write a bash script that will allow me to manage my "virtual network" (in reality just a bunch of directories and files). I need to obtain something like : I have my own command 'connect'. We can use it in two different modes: user and admin.If I type 'connect adashiu virtual_machine_name, computer will ask about password, if password is correct he will change a prompt to :

adashiu_at_virtual_machine_name >

after that user can start to use commands reserved only for user mode.Analogically with admin mode: prompt 'admin >' and administrator can only use bunch of commands reserved for him.

View 1 Replies View Related

General :: Changing The Font Size At Cmd Prompt?

Sep 13, 2010

i have changed my monitor from crt to lcd and find the fonts to be a little out of focus,

so far i have achieved native resolution of 1280x1024 in gnome which is great! i have configured grub by adding the vga=xxx appropraite for native resolution of my monitor which is great !.........but herein lay the problem, everything is so small and stuck up in the left corner , so small that i cant read it very well.

how do i increase the font sizes at cmd prompt without changing the resolution ? dare i say ........in windows i would increase the DPI , how do i achieve this in centos ?

View 7 Replies View Related

Ubuntu :: Bash Color In A Script Not Working?

Mar 6, 2011

This works (meaning it changes color) from CLI...echo -e 'e[1;36m' testCyanBut if I put that same exact line in a script, the result is not colored, and it displays the actual command on screen like this...-e 'e[1;36m' testCyanThe script is obviously executing. Why isn't it interpreting the backslash command in the script?

View 2 Replies View Related

Ubuntu :: Bash File Color Decoding?

Apr 15, 2011

Is there a place in my 10.04 OS that tells me the meaning of the colors of files? I have a folder that I moved to my home directory when i upgraded from 9.10 to 10.04. In that folder was a .tar.gz file that was green - I then deleted that file and ran another compression command - same files, same everything, but when I ran it this time, it is now red. Any ideas. I'd like to know what the color indication is on any given file.

View 2 Replies View Related

Fedora :: Color Prompts Screws Bash?

Aug 7, 2010

I got a good one!I colorized my prompt as follow; Green for normal user, Red for root:

Root .bashrc:
PS1=e[0;31m[ ][u@h:w][!]\$ e[m"
User .bashrc:
PS1="e[0;37m[ ][u@h:w][!]\$ e[m"
Which gives:

[Code]...

View 7 Replies View Related

Ubuntu :: Customizing Terminal - Changing Prompt (Maverick / Gnome)

Jun 9, 2011

To flesh out my *nix capability, I create new identities and give them the functionality that I liked in previous ones. I've added the "open terminal here" script, which I find invaluable. Now I want to change the prompt. This is what the terminal does right now:
ITo run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
elliot@dan:/media/KINGSTON$

- Where do I go to shorten the prompt dramatically? I can't really think of a situation where a shorter prompt isn't better or color matters.
- How do I adios the 2 sentences that want to appear every time I open this terminal? I'm aware what sudo does.
- Instead, I would like the equivalent of a pwd command. Where would I put that?
- How do I get the output of this terminal to be simultaneously saved in a file. I do so much copying and pasting out of these terminals that I'm looking for easier ways to do it.

View 2 Replies View Related

Programming :: Get Pixel Color From Screen In Bash Script?

Nov 25, 2010

I would like to get the pixel color from screen at (320,240) and if the color = 0xFFFFFFFF , i would like to execute a command.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved