Pagina 1 di 1

inizio script

Inviato: ven 30 giu 2006, 1:02
da FelipeP
la mia domanda è se esiste uno scipt che esegue all'inizio, quando un user logged in???


gracias.-

Inviato: ven 30 giu 2006, 1:26
da gallows
Se usi la bash:
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.
Se non è una shell di login ~/.bashrc.

Inviato: ven 30 giu 2006, 9:06
da bruno82
In raltà mi sembra che ~/.bashrc sia sempre lanciato da ~/.bash_profile

Codice: Seleziona tutto

# ~/.bash_profile

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi
... quindi forse ~/.bashrc serve solo per una questione di ordine, per non riempire ~/.bash_profile di righe meno importanti (boh?!)

Inviato: ven 30 giu 2006, 10:13
da Paoletta
bruno82 ha scritto:In raltà mi sembra che ~/.bashrc sia sempre lanciato da ~/.bash_profile
questo non in slackware, ma ad esempio in fedora
bruno82 ha scritto: quindi forse ~/.bashrc serve solo per una questione di ordine, per non riempire ~/.bash_profile di righe meno importanti (boh?!)
no, serve quando lanci una shell interattiva (quindi non di login)