How do I add a PATH that STICKS in Debian?
I've already got in my /etc/profile:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "`id -u`" -eq 0 ]; then PATH="/usr/java/jdk1.5.0_11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else PATH="/usr/java/jdk1.5.0_11/bin:/usr/local/bin:/usr/bin:/bin:/usr/games" fi if [ "$PS1" ]; then if [ "$BASH" ]; then PS1='\u@\h:\w\$ ' else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi export PATH umask 022 JAVA_HOME=/usr/java/jdk1.5.0_11/ export JAVA_HOME But the JAVA vars don't appear in "env". Why? |
It doesn't appear in which case?
If you open an xterm AS USER, it works. You're not supposed to work as root anyway. man bash part INVOCATION |
who said anything about working as root?
If I said or implied it, I didn't intend to. If I open "konsole" or "kate", as myself, and type "env" at the command prompt I get a path without the java directory.
|
Quote:
Quote:
Profile file is read WHEN you logging only, it is not executed again. So I guess you just made the change and you need to restart your WM. If you don't want to restart your WM, you have to execute profile in the current shell: source /etc/profile Again, my best advice would really be that you read man bash , Part invocation also search for "source" in the manpage Using man and searching: man bash type / type what you look for, example INVOCATION type enter type n for next occurence type ? to invert direction of searching and then n for going up type / again to go forward again type q to quit |
All times are GMT -5. The time now is 03:11 AM. |