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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
10-08-2004, 05:37 AM
|
#16
|
Member
Registered: Sep 2004
Distribution: OpenSuSe
Posts: 153
Rep:
|
Apart from the single-quotes (which I'm not exactly sure of), the variable PS1 has not been exported. The changes would otherwise not last beyond the current shell.
HTH.
|
|
|
10-08-2004, 06:12 AM
|
#17
|
Member
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185
Original Poster
Rep:
|
It doesn't matter (as far as I can test) if I use single or double quotes...
However, it appears as if I was somewhat incorrect when I said that the dcop option didn't do what I wanted to do... [insert slightly embarrassed smiley here] It does change the title to "whatever_I_want - Konsole".
So my problem is solved. Thanks for your help everyone. The question remains though, why I can't adjust PS1 (to adjust the Konsole title) in a script. I've tried all your suggestions, but can't get it to work...
Thanks,
/TLV
|
|
|
10-08-2004, 10:09 AM
|
#18
|
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320
Rep:
|
PS1 is set to a specific string every time you open a shell.
If you set PS1 in a script, and then a new shell is opened from that script, ~/.bashrc will be reread, changing the PS1 back to whatever is in ~/.bashrc. The only way I know to can change it from another script is to pass a variable with "export", and have the PS1 variable in ~/.bashrc set up to accept the exported variable. If PS1 isn't specified in ~/.bashrc the variable will be read from the global bashrc file.
You might be able to export PS1 from a script and put PS1="$PS1" in ~/.bashrc to prevent the global bashrc PS1 variable from being read. I haven't tested it, but I guess it might work.
|
|
|
10-08-2004, 11:25 AM
|
#19
|
Member
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185
Original Poster
Rep:
|
Hmm, that makes sense. I was just wondering 'cos I never got the export part to work. But, there may have been other processes at work (e.g., PROMP_COMMAND) that made things not work as planned. For now I don't really have the time to dig deeper into shell-programming.
Thanks for the help.
/TLV
|
|
|
All times are GMT -5. The time now is 06:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|