[Konsole-devel] [Bug 222370] Wrong $PS1 expansion in auto-started konsole

Jekyll Wu adaptee at gmail.com
Sat Aug 27 06:00:15 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=222370


Jekyll Wu <adaptee at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |adaptee at gmail.com
         Resolution|                            |WORKSFORME




--- Comment #3 from Jekyll Wu <adaptee gmail com>  2011-08-27 06:00:13 ---
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.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list