JAVA_HOME in /etc/profile doesn't work in GNOME terminal
Hello world.
I wanted the JAVA_HOME environment variable and the JAVA_HOME/bin set for all users in my system (Debian 3.1), so I changed the "/etc/profile" file. Here's a stract. Code:
if [ "`id -u`" -eq 0 ]; then But, with GNOME terminal it doesn't work. I even restarted my computer. The strange thing is that I did the same for my Fedora Core 4 and everything goes well. Please some help, I really need to get rid of this. |
Hi,
Try to alter the second path line so it points to your install dir. Somthing like this: Code:
if [ "`id -u`" -eq 0 ]; then http://wiki.serios.net/wiki/Debian_J...K_installation |
Thank you for replying and sorry for not having done the same (no Internet on sunday).I'll give it a try tonight and share my results.
|
I tried doing the adding in the second line and it didn't work.
The changes I made were effective in the tty1 but not in the GNOME terminal. |
Hi, I am not an expert but i recently installed java sdk and for me i installed java in the specified default locations "/opt/jdk1.5.0_06/" and after modification of my /etc/profile, it looks following way:
Code:
if [ "`id -u`" -eq 0 ]; then |
Guess what...I tried your suggestion and the problem is the same. Thanks for your time guys.
I don't know what happens exactly but running Quote:
I have installed Ubuntu on my computer and have the same problem. I finally managed some way to have my JAVA_HOME and other variables consistently but not much conviniently. I hope someone could explain why this all happens. I've read a lot about the subject and my case seems to be strange. Thanks for helping. |
This is what my /etc/profile looks like using Debian Testing:
Code:
if [ "`id -u`" -eq 0 ]; then |
I finally got it.
The solution was understanding what a login shell is. When in ttyx you use a login shell while when a gnome terminal (pts) you use a non login shell. So I had to do the exporting of variables in the /etc/bash.bashrc (for no login shells) and /etc/profile (for login shells) files. Now it works!!! For a more detail explanation look at: http://telin.ugent.be/~slippens/drup...hrc_and_others Thanks for your time and help |
All times are GMT -5. The time now is 09:49 PM. |