LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-13-2003, 09:54 PM   #1
robertmarkbram
Member
 
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!

Rob
 
Old 10-13-2003, 09:58 PM   #2
teval
Member
 
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
Skyline
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
Walt_R
LQ Newbie
 
Registered: Oct 2003
Posts: 8

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

Just in case

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

PS1=Waiting$
PS2=OOPS!
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
robertmarkbram
Member
 
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 ]
then
. ~/.bash_profile
fi

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
#fi

Then it worked!

Rob
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:29 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
Open Source Consulting | Domain Registration