help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "source" shell commands


From: Tim X
Subject: Re: "source" shell commands
Date: Mon, 26 Mar 2007 08:36:49 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 25.03.2007 um 12:55 schrieb Matthew Flaschen:
>
>> Apparently bash.  However, ~/.bashrc already sources ~/.rc , which
>> includes JAVA_HOME .  It was my impression that bash *always* read
>> ~/.bashrc .
>
> As I recommended: put an
>
>       echo " Hi, Matt! It's me, your ~/.bashrc. Remember me, still?" > /
> dev/console
>
> into your ~/.bashrc and see what you'll see.
>

Better still, lets go back to basics and trace what exactly is getting
run/sourced and where. The reason I say this is that *most* GNU Linux systems
(and many Unix varieties) actually use /bin/sh to run the X session login/setup
scripts. This is why the values Matt has in his ~/.bashrc are not being
executed. 

The simplest solution I've found is to change the Xsession script that sets up
your session to be a bash login shell - then ~/.bash_profiel (or ~/.profile)
will get sourced prior to the window manager being started and everything that
is then spawned by the window manager (using menus, 'run' boxes or start icons)
will inherit the users login env. 

The point Pete mentioned about JAVA_HOME being a site wide variable is quite
valid. It would be reasonable to stick the JAVA_HOME environment in
/etc/profile as long as all the paths are also site wide/readable (i.e. java
classpath does not have user directories in it.)

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]