Bug 73599 - konsole doesn't honor PS1 shell variable in non-bash shells
Summary: konsole doesn't honor PS1 shell variable in non-bash shells
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-27 13:51 UTC by sombragris
Modified: 2004-03-08 13:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sombragris 2004-01-27 13:51:34 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Slackware Packages
OS:          Linux

Hi,
thanks for the hard work in kde 3.2.

I use Slackware Linux 9.1 and my default shell is ksh93 (the Korn shell) as defined in /etc/passwd. Well, I defined my own shell prompt ($PS1) in ~/.profile as recommended. The problem is that Konsole doesn't recognize this setting and it only offers to me the raw '$' instead of my shell.

The expected behavior would be for Konsole to recognize and honor the PS1 shell variable. If there is a workaround for this, I am not aware it is documented.

Thanks for all your hard effort.
Yours,


Eduardo Sanchez
from Asuncion, Paraguay, South America
member of the KDE-ES Spanish Translation Team
Comment 1 Stephan Binner 2004-01-29 17:11:15 UTC
Konsoel as a terminal emulator has nothing to do with a shell prompt or your shell initialization problems.
Comment 2 sombragris 2004-01-29 18:02:31 UTC
I respectfully request you to consider this bug as valid. I understand this should be a konsole-related bug since this behavior was not present in KDE 3.1x. It only appeared in 3.2 as far as I can tell. That, and only that, was the reason why I reported this as a Konsole bug.

Thanks,

Eduardo Sánchez
Asunción, Paraguay, South America
Member of the KDE-ES Spanish translation team
Comment 3 Ken Deeter 2004-01-30 10:55:37 UTC
You must have changed something in your shell configuration, (perhaps you are not using a 'login' shell?) but whether you get your prompt from PS1 or you get $ has nothing to do with konsole. Konsole just prints out what the shell program outputs.
Comment 4 Stephan Kulow 2004-01-30 11:10:05 UTC
as explained by the second one now
Comment 5 sombragris 2004-02-02 14:52:58 UTC
Sorry to bother you again with this issue. I have new information.

In short: Konsole appears to ignore system-wide settings, honoring only settings made in the user's home directory.

How to reproduce:

1. I made a fresh install of slackware 9.1 with the stock kde 3.1.4 in a test system. I created some user accounts. After that, I modified the systemwide /etc/profile file to change the default *bash* prompt to

PS1='[\u: \w] \$ '

and konsole recognized the change. Now every prompt for every user was accepted.

2. After that I upgraded to KDE 3.2rc1 and now konsole no logner honors the PS1 variable even in bash. The only way to provide a customized shell prompt is to write something in the home directory of each user. AFAIK there's no way to provide system-wide settings.

I can provide screenshots if requested.

Thanks,


Eduardo
Comment 6 Sergio Avila 2004-02-29 14:16:04 UTC
in ~/bashrc insert:
export PS1="[\u@\h \w]\$ "

this work fine! ;-)
Comment 7 sombragris 2004-03-03 12:44:58 UTC
Sergio, thanks for your pointer. Please keep in mind the paragraph marked as #2 in my previous posting... I knew it. This is not the issue at hand here. What I am reporting here is that there used to be a certain behavior in konsole, which is no longer the case. Konsole used to honor $PS1 as a *system-wide* default in /etc/profile. Now it doesn't.

regards,
Eduardo
Comment 8 Waldo Bastian 2004-03-03 13:59:36 UTC
How do you start konsole?
Comment 9 sombragris 2004-03-03 14:19:26 UTC
I usually start it from the mini CLI, typing 'konsole'.

Regards,
Eduardo
Comment 10 Stephan Binner 2004-03-05 21:41:54 UTC
Try "konsole --ls".
Comment 11 sombragris 2004-03-08 13:01:47 UTC
Stephan, thanks! this solves the issue for all practical purposes. I will create an alias for konsole that says 'konsole --ls'. Now, I wonder if this was the default behavior in versions previous to 3.2 and now it was changed to a cmdline switch?

Anyway, thank you very much for the help regarding this issue!

Eduardo