Re: /etc/profile (era: Java)
Bruno,
Estes são trechos da manpage 1 referente ao Bash:
...
--noprofile
Do not read either the system-wide startup file /etc/profile or
any of the personal initialization files ~/.bash_profile,
~/.bash_login, or ~/.profile. By default, bash reads these files when
it is invoked as a login shell (see INVOCATION below).
...
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file exists.
After reading that file, it looks for ~/.bash_profile, ~/.bash_login,
and ~/.profile, in that order, and reads and executes commands from
the first one that exists and is readable. The --noprofile option may
be used when the shell is started to inhibit this behavior.
...
OBS: A manpage do sh diz o mesmo que a do Bash, e o mesmo vale para o Ksh
Quando fazes logon no KDM, GDM ou o que for, na realidade está abrindo
um terminal, que fica no dispositivo /dev/pts/n (n é um número entre 0
e o limite do kernel, comumente 255), ou seja, tu abre um shell de
login e consequentemente interpreta o /etc/profile.
Voltando à manpage, note que se tiveres um ~/bash_profile, um
~/.bash_login ou um ~/.profile estes serão executados após o
/etc/profile (o que for encontrado primeiro, na ordem citada, é
executado e os demais não), faça um teste com um novo usuário (crie um
e faça logon no modo gráfico)
--
Maxwillian Miorim
miorimmax@gmail.com
----
Slackware 10.2 / current e OpenBSD 3.8
There's no place like ${HOME}
Reply to: