Summary: | Wrong $PS1 expansion in auto-started konsole | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Vadym Krevs <vkrevs> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | adaptee |
Priority: | NOR | ||
Version: | 2.3.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Vadym Krevs
2010-01-12 13:49:01 UTC
On Linux, getpwuid_r is used to get the user name. What distribution are you using? At the time of bug reporting, opensuse 11.2. Now 11.3. Only the auto-started konsole is affected by this issue. Any subsequently started konsole uses "user1". All other applications also use/display "user1". Maybe I did not set it up correctly, but I could not reproduce this problem. I created two new accounts 'user1' and 'user2' which are identical except name. 'user1' comes before 'user2' in /etc/passwd. The result was no mater which account was used to log into KDE/GNOMG/XFCE/console, whoami and PS1 always show 'user1', including the session-restored konsole. I think that is quite rational. getpwuid_r() is used by programs to find the username matching the uid. The manpage does not mention what will happen when multilple names match one uid, but 'returning the first match' seems the natural and actual way. And even the reported problem can be reproduced, that $PS1 is generated by bash. So the real problem is although bash has the right uid(the uid shared by user1 and user2), it reports the wrong username. |