Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

JAVA_HOME and etc/profile

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
BugFactory
Posts: 13
Joined: 2005-09-22 17:04

JAVA_HOME and etc/profile

#1 Post by BugFactory »

Hello. Sorry for posting this many questions these days. Yet I have another one.

I have added export JAVA_HOME="/usr/java/java" to my etc/profile file, then rebooted. I opened a terminal under Gnome, typed env, but no JAVA_HOME! I then added the same line in /home/account_name/.bashrc and it worked. What am I missing?

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#2 Post by lacek »

The profile files (/etc/profile, ~/.bash_profile) are sources upon 'logging in', thus, when a 'login shell' runs. The ~/.bashrc file is executed when a non-login shell starts. Since X terminal emulators are not login screens, they don't source the profile files. For some misterious reason, however, graphical login screens doesn't pass the enviromental variables in the profile files to spawned applications. That's why you don't get anything from profile when you use [xgk]dm. There may be a workaround, but I myself don't use any graphical login manager, so I can't help you with this. Put your settings to your .bashrc, or have your bashrc file source the /etc/profile file.

Post Reply