Bug 17795 - bash started by konsole does not execute ~/.bash_profile
Summary: bash started by konsole does not execute ~/.bash_profile
Status: CLOSED DUPLICATE of bug 16860
Alias: None
Product: Sisyphus
Classification: Development
Component: kde4base-konsole (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Sergey V Turchin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-06 03:43 MSK by Denis Filimonov
Modified: 2008-11-07 13:43 MSK (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Filimonov 2008-11-06 03:43:55 MSK
Bash shells in KDE4's konsole tabs fail to initialize properly.
Judging by strace output, bash doesn't read any of ~/.bash* files except ~/.bash_history

The problem does not appear when bash is started from other terminals such as xterm or KDE3's konsole.

I've tried /bin/bash and /bin/bash -i, makes no difference.

kde4base-konsole-4.1.2-alt1
Comment 1 Denis Filimonov 2008-11-07 00:07:29 MSK
I think I figured out what happened.
/usr/lib/kde4bin/konsole has setgid flag (utemper group) and it executes shell with the user's real gid and utemper effective gid.

According to bash manual page ``If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read...''

I believe konsole should do setegid(getgid()) before executing the shell.
Comment 2 Andrey Rahmatullin 2008-11-07 09:57:42 MSK

*** This bug has been marked as a duplicate of bug 16860 ***
Comment 3 Sergey V Turchin 2008-11-07 13:43:38 MSK
(In reply to comment #1)
> ``If the shell is started with the effective user (group) id not equal to the real user (group) id, and the
> -p option is not supplied, no startup files are read...''
Спасибо за наводку