Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
user umgebungsvariablen setzen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
klaus_harrer
n00b
n00b


Joined: 24 May 2004
Posts: 60

PostPosted: Sun Jun 20, 2004 1:15 pm    Post subject: user umgebungsvariablen setzen Reply with quote

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
View user's profile Send private message
leuenberger
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 147
Location: Zurich, ZH, Schweiz

PostPosted: Sun Jun 20, 2004 1:27 pm    Post subject: Reply with quote

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. :oops:

Gruss Reto


Last edited by leuenberger on Sun Jun 20, 2004 1:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
_hephaistos_
Advocate
Advocate


Joined: 07 Apr 2004
Posts: 2694
Location: salzburg, austria

PostPosted: Sun Jun 20, 2004 1:29 pm    Post subject: Reply with quote

hallo,

hast du vielleicht in zB .bashrc oder so auch ein export PATH drinnen?
Back to top
View user's profile Send private message
leuenberger
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2003
Posts: 147
Location: Zurich, ZH, Schweiz

PostPosted: Sun Jun 20, 2004 1:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
klaus_harrer
n00b
n00b


Joined: 24 May 2004
Posts: 60

PostPosted: Sun Jun 20, 2004 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
_hephaistos_
Advocate
Advocate


Joined: 07 Apr 2004
Posts: 2694
Location: salzburg, austria

PostPosted: Sun Jun 20, 2004 2:00 pm    Post subject: Reply with quote

mach mal
"source /etc/profile && source ~/.bashrc"

das aktualisiert deine änderungen (und den pfad)....
Back to top
View user's profile Send private message
Spooky85
n00b
n00b


Joined: 15 Jun 2004
Posts: 25
Location: Germany,Ruhrpott

PostPosted: Sun Jun 20, 2004 2:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum