#!/bin/sh

(o con el bash)

se le a�ade la opci�n -ls, creo que era esta (ahora estoy con las g�indous y no puedo mirarlo), el shell lee el .profile del usuario. O sea, quedando asi:

#!/bin/sh -ls

Y ya esta.


...mmm... y nos podr�as de paso indicar para que sirve esa opci�n?


��Oops!, por supuesto, (ya pens� que no llegaban mis correos), en realidad era la opci�n -l, o --login, (no -ls) para el bash, que hace lo siguiente (sacado del man del bash):

[...]
When  bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes  com-
mands 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.
[...]

y para los que no sepan ingl�s, dice, en resumen, que con esa opci�n, busca, y si los encuentra, ejecuta, los siguientes ficheros: /etc/profile, ~/.bash_profile, ~/.bash_login y por �ltimo ~/.profile. de forma que ya tiene ah� todo el entorno del usuario que entra en la m�quina.

Despues de instalar el xdm, el fichero este viene con la invocaci�n del shell sin esta opci�n, lo cual a mi me parece que no tiene mucha l�gica, porque al fin y al cabo, lo que tienes es a cierto usuario entrando en una m�quina, por tanto parece l�gico que se cargue su entorno, �no?

Saludos

Responder a