Environment with konsole and kdm
James Richard Tyrer
tyrerj at acm.org
Fri Oct 25 04:24:08 BST 2002
Stefan Petersen wrote:
> Hi,
>
> I have made some testings with kdm, konsole and the PATH variable.
> kdm is compiled with PAM-support, authentication has pam_env support.
>
> 1) PATH not set in pam_env.conf
>
> The kdm-logged in user has the PATH variable set as shown in kdmrc under UserEnvironment.
> If logged in with root, KDE doesn't start with kdm, because the PATH variable is neither set
> from UserVariable nor from the entry of SystemEnvironment in kdmrc.
> To get root logged in with kdm, I need to set PATH in pam_env.conf
>
> How does kdm handle the PATH variable exactly ? Why is there a difference between root and
> other users ?
>
> 2) PATH set in pam_env.conf
> Both, root and users have the entries from this file.
>
> 2) su to root from konsole, typing 'su'
> Try to su from konsole, PATH of root-user is set to entries in login.defs (ENV_SUPATH) plus the extension set in
> ~/.bashrc
> The same if su'ing to another, unprivileged user.
>
> Why are the entries in /etc/profile not read, but /etc/login.defs is read ?
> Neither pam_env.conf nor the SystemEnvironment/UserEnvironment in kdmrc does match one of these settings, why?
>
> 3) su - to root from konsole, typing 'su -'
> With the hyphen, /etc/profile is read, also ~/.bashrc is read
> And again, those settings does not match pam_env.conf or the entries in kdmrc.
>
> To get things working properly, I decided, when logging into the system with kdm,
> I have to set pam_env.conf with the correct pathes.
> If I try to su from konsole, I use the version with the hyphen to get a clean environment.
>
> At the moment I don't understand, how kdm and konsole handle with the environment.
> Hopefully somebody can help me clearing up my mind, and answer the above questions.
>
When KDM is run, it resets the PATH -- that is the default PATH from:
"init" is overwritten.
The PATH is in:
[X-*-Core]
UserPath=<your usr path>
SystemPath=<your root path>
Unfortunately, IMHO PAM exists. My solution is not to use it.
When you start from KDM, it does not run anything. It passes control to
the script: "Xsession". If you want your: "profile" & "~/.bash_profile"
scripts run you can either source them from: "Xsession" or make:
"Xsession" a login script by changing the first line to:
#!/bin/bash --login
This may have side effects. Specifically the RedHat global: "bashrc"
script will need to be fixed.
--
JRT
___________________________________________________
This message is from the kde mailing list.
Account management: http://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list