[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: FOUND IT !!!!!!!
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2001-05-11 9:14:16
[Download RAW message or body]

> > Yes, the same was in my case - but .profile was not executed when
> > KDE was started by KDM, so it was not set.
> 
> Oops, really? That's a bug then (IMHO). ~/.profile =has= to be
> executed, that's what it's for!
> 
that's sort of a common misconception ... /etc/profile and ~/.profile
are the bourne shell's startup files, not the xsession's ... what, if
your xsession is csh-based, not sh (or, more common, what if you use
csh, so you don't have any startup files for sh)? 
ways of doing it "right":
- important variables for anyone should be set by a pam module or, if
  no pam is available, by the global Xsession file. that's what the
  /etc/environment file is for on some systems.
- put an .xsession (or however your global Xsession wants this file to
  be named) in your ~ and make kdm run it by selecting the "default"
  session type. in this .xsession, the last command will surely be
  "exec startkde" or something like that. what you can do there to set
  your environment ... a) manually set some variables or b) just
  source the shell's startup files (ugly, but less work).

example for solution b):

~/.xsession:
#! /bin/sh
if [ -f /etc/profile ]; then
  . /etc/profile
fi
if [ "$BASH" -a -f ~/.bash_profile ]; then
  . ~/.bash_profile
elif [ -f ~/.profile ]; then
  . ~/.profile
fi
if [ -f ~/.cshrc ]; then	# FIXME: there are more [t]csh files!
  eval `csh -c 'source ~/.login; bash -c set'`	# this needs more work
fi
exec startkde

the part where the startup files are sourced is done by many
distributions in the global Xsession for convenience - but strictly
speaking it's a misuse of these files and therefore up to the user, if
he really wants it.
cde uses an own environment file called ~/.dtprofile. it's a very clean
solution, as it does not interfere with the shells. maybe, i should
add sourcing of ~/.xprofile or something like that to the default
Xsession?

best regards

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Nothing is fool-proof to a sufficiently talented fool.
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic