LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-08-2004, 09:00 PM   #1
sunshine
LQ Newbie
 
Registered: Sep 2003
Distribution: mdk 9.2, knoppix 3.2, slackware 9.1
Posts: 18

Rep: Reputation: 0
Question customizing bash prompt?


I'm trying to customize my bash prompt for konsole/kterm. This is the the coding for the way I want it:

PS1="\e[32;1m\]\u@\H \W#\[\e[0m\]"

For some reason when I close the session it doesn't come up this way. Whats wrong...
here is a copy of my .bash_profile and .bashrc files from my home dir.

==============================================
My .bash_profile:
==============================================
source ~/.bashrc
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

==============================================
My .bashrc file:
==============================================
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

if [ "$TERM" = "linux" ]
then
#we're on the system console or maybe telnetting in
export PS1="\e[32;1m\]\u@\H \W#\[\e[0m\]"
else
#we're not on the console, assume an xterm
export PS1="\e[32;1m\]\u@\H \W#\[\e[0m\]"
fi
==============================================

Whats wrong here?
 
Old 03-08-2004, 09:18 PM   #2
sunshine
LQ Newbie
 
Registered: Sep 2003
Distribution: mdk 9.2, knoppix 3.2, slackware 9.1
Posts: 18

Original Poster
Rep: Reputation: 0
I have it, just needed to put this at the end of the .bash_profile -rather than the middle.

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
 
  


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
bash prompt subG Slackware 6 01-18-2006 04:43 PM
Customizing the command prompt sweetnsourbkr Linux - General 4 11-10-2005 12:34 PM
help with bash prompt everythingand2 Linux - Newbie 7 12-06-2003 04:28 PM
Bash Prompt mandraketux Mandriva 2 11-28-2003 10:05 PM
Customizing Bash gearoid Programming 10 11-19-2003 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 11:24 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