Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-13-2003, 09:54 PM   #1
Registered: May 2003
Location: Melbourne, Australia
Distribution: Cygwin, Windows XP
Posts: 69

Rep: Reputation: 15
Setting PS1 variable for KDE Konsole shell (RH9)

Howdy All!

I have set PS1 in my .bash_profile, but this has no effect on KDE's Konsole.

I seem to remember reading somewhere that it is a slightly different program and doesn't read the profile?

So how do I alter PS1 for Konsole so it will 'stick'?

Thanks for any advice!

Old 10-13-2003, 09:58 PM   #2
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Rep: Reputation: 30
Go into settings, configure knosole, click sessions.
In there click linux console, and look at how it's beeing invoked.
I usually use: bash --init-file ~/.bash_profile
It starts up bash with the bash_profile as the initfile
Old 10-13-2003, 10:11 PM   #3
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Its ~/.bashrc that you'll need to modify.

For example - add something like this -

PS1=\w Hello $

choose your own characters.
Old 10-13-2003, 10:49 PM   #4
LQ Newbie
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
Before messing with these files, always make a copy of the original.
IE: cp .bashrc

Just in case

PS1 can be set in .bashrc or .bash_profile, but it has to be exported. IE:

export PS1 PS2

to test the new .bashrc enter . .bashrc at the user prompt.

$ . .bashrc

This will re-execute the .bashrc file without rebooting either XWindows or the OS.

Walt R.
Old 10-14-2003, 07:38 PM   #5
Registered: May 2003
Location: Melbourne, Australia
Distribution: Cygwin, Windows XP
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks for the help - I just had to source ~/.bash_profile from ~/.bashrc:

# Source bash profile
if [ -f ~/.bash_profile ]
. ~/.bash_profile

And remove the code in .bash_profile that sources .bashrc (to prevent an infinite loop!):

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

Then it worked!



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
executing konsole from shell script Meriadoc Linux - Newbie 10 07-10-2009 08:08 AM
Problem with Shell-Konsole (Klauncher) gavita Linux - Newbie 9 11-30-2005 12:09 PM
help i can't save my PS1 setting Paxmaster Linux - Software 3 07-17-2004 10:39 PM
PS1 variable wogga Red Hat 2 05-26-2004 05:39 PM
setting the PS1 enviroment variable in xterm qanopus Linux - General 2 04-29-2003 08:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration