Linux 15.052 Themen, 107.240 Beiträge

Linux

jkt3 / 3 Antworten / Baumansicht Nickles

Hi Leute,

ich flipp gleich noch aus...!
Wie kann ich unter ubuntu 5.10 die $PATH-Umgebungsvariable systemweit (für alle User) ändern. Meine Versuche das über /etc/profile oder über /etc/X11/Xsession.d zu machen bringen nix. Irgendwo muss ein File schlummern in dem $PATH gesetzt ist, das ich nicht finde.

bei Antwort benachrichtigen
KarstenW jkt3 „Linux“
Optionen

Bei Debian testing (Ubuntu baut auf Debian testing auf) wird die systemweite PATH Variable schon in der Datei /etc/profile eingestellt:

# /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/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/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

Debian GNU/Linux https://www.debian.org/index.de.html
bei Antwort benachrichtigen
jkt3 KarstenW „Bei Debian testing Ubuntu baut auf Debian testing auf wird die systemweite PATH...“
Optionen

Meine Versuche das über /etc/profile oder über /etc/X11/Xsession.d zu machen bringen nix. Irgendwo muss ein File schlummern in dem $PATH gesetzt ist, das ich nicht finde.

Änderungen an den besagten Files bringen nix (in Bezug auf $PATH). An lokalen Einstellungen im Home-Verzeichnis kann's eignetlich auch nicht liegen. In der .bashrc und .bash_profile wird kein $PATH gesetzt und eine .profiles gibbet gar nicht (mehr Wink ).
Also wo kann diese verfi**te Variable noch gesetzt werden?

bei Antwort benachrichtigen
KarstenW jkt3 „Meine Versuche das über /etc/profile oder über /etc/X11/Xsession.d zu machen...“
Optionen

Du kannst dann noch die Datei .bash_profile anpassen:


cat .bash_profile

# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# the rest of this file is commented out.

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi

# do the same with MANPATH
#if [ -d ~/man ]; then
# MANPATH=~/man${MANPATH:-:}
# export MANPATH
#fi
# ---- language-env DON'T MODIFY THIS LINE!
# .bash_profile is executed on login.
if [ -f ~/.bashrc ]
then
# execute .bashrc if it exists.
. ~/.bashrc
fi
# ---- language-env end DON'T MODIFY THIS LINE!

Debian GNU/Linux https://www.debian.org/index.de.html
bei Antwort benachrichtigen