View previous topic :: View next topic |
Author |
Message |
klaus_harrer n00b
Joined: 24 May 2004 Posts: 60
|
Posted: Sun Jun 20, 2004 1:15 pm Post subject: user umgebungsvariablen setzen |
|
|
Hallo
Ich habe mich gerade durch die Doku zum setzen der Umgebungsvariablen durchgebissen. Was ich nicht verstehe das die Umgebungsvariablen für den User nicht richtig gesetzt wird. In der /etc/profile wird ein Teil der Umgebungsvariale gesetzt und ein Teil wird von der Variable $PATH gesetzt die in der /etc/profile.env definiert wird.
Code: |
/etc/profile
export PATH="/bin:/usr/bin:${PATH}"
|
Code: |
/etc/profile.env
export PATH='/usr/local/bin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.3:/usr/X11R6/bin:
/opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin:/usr/qt/3/bin:/usr/kde/3.2/bin'
|
Und dies wird für den user als Umgebungsvariable gesetzt
Code: | PATH=/usr/local/bin:/usr/bin:/bin |
Vieleicht habe ich da was falsch verstanden. Wäre schön wenn mir da einer weiterhelfen könnte.
MfG
Klaus |
|
Back to top |
|
|
leuenberger Tux's lil' helper
Joined: 13 Jul 2003 Posts: 147 Location: Zurich, ZH, Schweiz
|
Posted: Sun Jun 20, 2004 1:27 pm Post subject: |
|
|
Bei mir steht folgendes:
Code: | if [ -e "/etc/profile.env" ]
then
. /etc/profile.env
fi
export PATH="$PATH:/usr/share/jdk1.3.1_10/bin" |
Ich denke Dein Problem ist, dass Du die $PATH nicht mehr aufruft. So wird die Variable, die in /etc/profile.env gesetzt wurde, einfach überschrieben.
EDIT: Sorry, dass war wohl nicht, was Du gesuch hast.
Gruss Reto
Last edited by leuenberger on Sun Jun 20, 2004 1:31 pm; edited 1 time in total |
|
Back to top |
|
|
_hephaistos_ Advocate
Joined: 07 Apr 2004 Posts: 2694 Location: salzburg, austria
|
Posted: Sun Jun 20, 2004 1:29 pm Post subject: |
|
|
hallo,
hast du vielleicht in zB .bashrc oder so auch ein export PATH drinnen? |
|
Back to top |
|
|
leuenberger Tux's lil' helper
Joined: 13 Jul 2003 Posts: 147 Location: Zurich, ZH, Schweiz
|
Posted: Sun Jun 20, 2004 1:31 pm Post subject: |
|
|
Hast Du das Problem nur bei einem Benutzer oder bei allen?
Ist es möglich, dasss eine andere Datei Deine PATH-Variable wieder überschreibet (z.B. .login, .bashrc, .bash_profile)?
EDIT: Zuerst falsch lesen und dann zu spät posten. Heute ist wohl nicht mein Tag!
Gruss Reto |
|
Back to top |
|
|
klaus_harrer n00b
Joined: 24 May 2004 Posts: 60
|
Posted: Sun Jun 20, 2004 1:56 pm Post subject: |
|
|
Hallo
Ich denke ihr meint die .bashrc und die bash_profile vom User. Da ist kein export zu finden.
Und da ist noch ein Problem ,wenn ich vom root zum user und zurück zu root wechsel, hat root keine umgebungsvariable PATH mehr. Dies vermute ich zwar nur ,denn root hat sämliche Befehle vergessen(env ,reboot u.s.w).
MfG
Klaus |
|
Back to top |
|
|
_hephaistos_ Advocate
Joined: 07 Apr 2004 Posts: 2694 Location: salzburg, austria
|
Posted: Sun Jun 20, 2004 2:00 pm Post subject: |
|
|
mach mal
"source /etc/profile && source ~/.bashrc"
das aktualisiert deine änderungen (und den pfad).... |
|
Back to top |
|
|
Spooky85 n00b
Joined: 15 Jun 2004 Posts: 25 Location: Germany,Ruhrpott
|
Posted: Sun Jun 20, 2004 2:47 pm Post subject: |
|
|
ich hab ein "aehnlcihes" problem mit eterm und so klappt alles hab ne alias zu su gesetzt:
alias su='su -'
wenn du su - <user> machst muesste alles korrekt sein so ists bei mir auch nur ueber xterm habe ich noch das problem das er beim oeffnen eines terminals nicht user@host oder so aehnlich schreibt also auch die PATH variable nicht richtig deklariert ist denn ich hab nur da stehen:
bash-2.05b$
das hab ich bisher noch nicht wegbekommen :/
klar ist es kein problem su - <user> zu schreiben ich haette es aber gerne sofort *g |
|
Back to top |
|
|
|