/etc/profile and ~/.bash_profile are not being read

janne jan.moren at lucs.lu.se
Wed Nov 17 03:29:09 UTC 2004


ons 2004-11-17 klockan 04:11 +0100 skrev Le grand pinguin:
> On Wed, Nov 17, 2004 at 11:52:31AM +0900, janne wrote:
> >
> > 
> > OK. Doing my own xsession feels more than a little overkill, just to get
> > ~/bin into my path.
> >
> > A third question: why do /etc/profile and ~/.bash_profile exist at all,
> > if they aren't used, and can't be used? It only confuses people to keep
> > them.
> 
> They aren't used? What makes youe think that? They aren't used to set up
> the environment of a graphical login - if you log into your computer
> with ssh or from a terminal then these files are sourced by the shell.

Ok. Didn't realize that. Ugh - you mean we have to do parallel configs
in different places to make it work the same whether graphical login or
via ssh?

> What exactly are you looking for: a way to set the environment for all
> processes started by the graphic environment? Then modify xsession. The 
> environment of the shell (most likely in a terminal window)? Than modify/
> create a ~/.bashrc file. 

I want to add ~/bin to my path (where ~ of course would differ by user),
as well as conditionally add a few shell variables, and have that
whether I log in graphically or via ssh.

For .xsession, it seems ubuntu doesn't read that either at startup. For
fixing Japanese input, I ended up adding stuff to ~/.gnomerc, which is
very wrong, but at least it worked.

Again, what are other systems doing to make this work?

> > Last, related question: the default paths are set _somewhere_. DOes
> > anybody know where that would be, so I can add my stuff there?
> 
>  /etc/login.defs ? (depending on what you want to achieve).

Seems to be it, yes. Sort-of workable for the path thing, though it will
break if I add another user, of course, and I can't do the other things
I need, since that file isn't actually run as a shellscript.


-- 
Trust the Computer. The Computer is your friend.
 
Tel. (Japan) 090-3622 8920            Dr. Jan Morén (mr)
                                      Dept. of Cognitive Science
http://lucs.lu.se/people/jan.moren    Lund, Sweden





More information about the ubuntu-users mailing list