View previous topic :: View next topic |
Author |
Message |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Mon May 02, 2005 6:56 pm Post subject: [BASH] Mi sono scomparsi i colori [Risolto] |
|
|
Il mio bash nn ha + i colori nonostante tutto sia aposto i colori sono scomparsi -.- non so cosa fare appena torno a casa vi posto + info ma se a qlc è successo e mi sa dire nel frattempo.... _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD
Last edited by koma on Tue May 03, 2005 12:57 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
.:chrome:. Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1738078993454a825c7608f.jpg)
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Mon May 02, 2005 7:03 pm Post subject: Re: [BASH] Mi sono scomparsi i colori |
|
|
koma wrote: | Il mio bash nn ha + i colori nonostante tutto sia aposto i colori sono scomparsi -.- non so cosa fare appena torno a casa vi posto + info ma se a qlc è successo e mi sa dire nel frattempo.... |
ti riferisci ai colori del prompt o a quelli dell'output di ls e simili? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
otaku Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/94458518843d149036f14a.jpg)
Joined: 16 Dec 2004 Posts: 428 Location: Rho (MI)
|
Posted: Mon May 02, 2005 8:56 pm Post subject: |
|
|
hai provato
Code: | env-update && source /etc/profile |
? _________________ Ventiquattr'ore al giorno in preda a una follia contorta... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Mon May 02, 2005 11:18 pm Post subject: |
|
|
Prova con:
Code: |
# mkdir /etc/bash
# mv /etc/bashrc /etc/bash/
|
_________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ic3M4n Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/108089865444d4c570e38bb.gif)
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Mon May 02, 2005 11:42 pm Post subject: |
|
|
anche io non li ho più i colori
@gutter:
ho provato con quello che dici ma non ho il percorso /etc/bashrc.
possibile? eppure sono convinto di usare bash.
boh provo ad approfondire un po. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CarloJekko Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/17829012804368ad2e5dc22.jpg)
Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Mon May 02, 2005 11:45 pm Post subject: |
|
|
oppure controlla in /etc/profile o in .bashrc il ps1 export
magari postalo(i)... forse è qualcosa lì in mezzo...
P.S.
Ic3M4n wrote: | anche io non li ho più i colori
ho provato con quello che dici ma non ho il percorso /etc/bashrc.
possibile? eppure sono convinto di usare bash.
boh provo ad approfondire un po. |
con il file .bashrc carichi le impostazioni personalizzate per la bash del tuo sistema...sostituendo le impostazioni generali messe in /etc/profile _________________ C.
Last edited by CarloJekko on Mon May 02, 2005 11:50 pm; edited 2 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Mon May 02, 2005 11:48 pm Post subject: |
|
|
ninte nn va
Code: | app-shells/bash
Available versions: 2.05b-r9 ~2.05b-r11 ~3.0-r7 ~3.0-r8 ~3.0-r9
Installed: 3.0-r11
Homepage: http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
Description: The standard GNU Bourne again shell
|
_________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CarloJekko Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/17829012804368ad2e5dc22.jpg)
Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Mon May 02, 2005 11:55 pm Post subject: |
|
|
ma hai fatto un etc-update di recente?
@Koma
Credo che tu ti sia coricato...
Bonne nuit !! (e la faccina che dorme dov'è ? vabbè uso questa che è semi dormiente ) ![Neutral :|](images/smiles/icon_neutral.gif) _________________ C.
Last edited by CarloJekko on Tue May 03, 2005 12:20 am; edited 2 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ic3M4n Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/108089865444d4c570e38bb.gif)
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Tue May 03, 2005 12:07 am Post subject: |
|
|
ho scoperto adesso che:
Code: | env-update && source /etc/profile
bash: env-update: command not found
|
ed ecco perchè non ho i colori...
... ma perchè non ho env-update? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ic3M4n Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/108089865444d4c570e38bb.gif)
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Tue May 03, 2005 12:17 am Post subject: |
|
|
scusatemi tutti... probabilmente è l'ora tarda...
dopo aver digitato due lettere e poi un'altra parolina
sono riuscito a digitare
(che vergogna adesso tutti voi riderete di me:cry:
cmq dobbiamo lasciarci alle spalle tutto ciò...
se chiudo il terminale e lo riapro cmq i colori non ci sono più. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CarloJekko Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/17829012804368ad2e5dc22.jpg)
Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Tue May 03, 2005 12:18 am Post subject: |
|
|
se usi konsole prova
konsole -ls
cmq credo proprio che sia 1 questione di export PS1=.... _________________ C. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ic3M4n Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/108089865444d4c570e38bb.gif)
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Tue May 03, 2005 12:24 am Post subject: |
|
|
si con
compare un'altra konsole con i colori a posto.
potresti spiegarmi bene la storia dell'export? non l'ho poi ben capita |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ic3M4n Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/108089865444d4c570e38bb.gif)
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Tue May 03, 2005 5:41 am Post subject: |
|
|
io invece no. in quanto /etc/bash l'ho creata io come ha detto gutter nel suo post precedente. invece ho scoperto che (koma) stai usando una versione di bash ancora mascherata, mentre io no.
Code: | app-shells/bash
Available versions: 2.05b-r9 ~2.05b-r11 ~3.0-r7 ~3.0-r8 ~3.0-r9
Installed: 2.05b-r9
|
VS
Code: | app-shells/bash
Available versions: 2.05b-r9 ~2.05b-r11 ~3.0-r7 ~3.0-r8 ~3.0-r9
Installed: 3.0-r11 |
quindi potrebbe anche essere dovuto ad un cambiamento del file di configurazione.
boh adesso smaschero e poi vi faccio sapere |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Tue May 03, 2005 6:17 am Post subject: |
|
|
koma wrote: | ho trovato la gabella!!! la la la la la
Code: | cp /etc/bash/bashrc /etc |
|
Ops ovviamente il mio trucchetto dipendeva da che versione di bash hai
Edit: Per favore metti il tag [Risolto]. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ic3M4n Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/108089865444d4c570e38bb.gif)
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Tue May 03, 2005 7:24 am Post subject: |
|
|
aggiornato bash alla versione mascherata ed anche io posso godermi di nuovo i colori! la cosa che mi piacerebbe capire è il motivo per cui questo è successo... controllando i file installati con la versione 2.05b-r9 non mi segna nessun file in /etc mentre con la 3.0-r9 si. questo confermato anche con tool grafico (porthole). boh. colgo l'occasione per ringraziarvi tutti per l'aiuto. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CarloJekko Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/17829012804368ad2e5dc22.jpg)
Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Tue May 03, 2005 9:33 am Post subject: |
|
|
mo ti posto un ps1 export aspè...
Code: | if [ `/usr/bin/whoami` = 'root' ]
then
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
##se sei root questa è il ps1 (quello che c'è davanti ai tuoi comandi)
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
normal='\e[0m' #in bash questi sono i colori
gray='\e[0;37m'
green='\e[0;32m'
yellow='\e[0;33m'
red='\e[0;31m'
blue='\e[0;34m'
cyan='\e[0;36m'
black='\e[0;30m'
magenta='\e[0;35m'
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
##se non sei root scriverà una cosa del genere : a capo \n - (\u nome utente) - ( \w sarebbe il pwd ) - \n a capo : e qui scrivi in blu
export PS1="\n$cyan-($green\u$cyan)-($green \w$cyan)$blue\n : "
##export PS1="$cyan($yellow$(CPUTEMP) C$cyan) $red\w : \n"
fi |
ti metto tutto il mio .bashrc (della mia home) poi vedi cosa ti piace
Code: | :cat .bashrc
if [ -e "/etc/profile.env" ]
then
. /etc/profile.env
fi
alias tv="DISPLAY=:0.1 mplayer -fs "
alias s="source /etc/profile"
alias ..="cd .."
alias cd..="cd .."
# 077 would be more secure, but 022 is generally quite realistic
umask 022
################################################################ aggiunta da me
normal='\e[0m'
gray='\e[0;37m'
green='\e[0;32m'
yellow='\e[0;33m'
red='\e[0;31m'
blue='\e[0;34m'
cyan='\e[0;36m'
black='\e[0;30m'
magenta='\e[0;35m'
##MYL1="-"
##MYL2="|"
MYL1="|"
MYL2="|"
MYDATE="$(/bin/date +'%d %B %Y - %H:%M')"
MYPTY="`/usr/bin/tty | /usr/bin/sed -e "s:/dev/::"`"
#MYKERNEL="`uname -n` on `uname -p` with a `uname -oi`"
MYKERNEL="`/usr/bin/uname -n`"
function CPUTEMP {
cpustat=`/usr/bin/sensors it87-isa-0290|/bin/grep CPU | /usr/bin/awk '{print $3}' `
echo -n $cpustat
}
################################################################
if [ `/usr/bin/whoami` = 'root' ]
then
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1="\n$cyan$MYL1-($green\u$blue on $red$MYKERNEL$cyan)-($blue$MYDATE$cyan)-($yellow$(CPUTEMP) C$cyan)-($green$MYPTY$cyan)\n$MYL2-($green Ti trovi in $yellow\w$cyan)$blue\n: "
fi
export PATH="/bin:/usr/bin:${PATH}"
fi
unset ROOTPATH
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]
then
export INPUTRC="/etc/inputrc"
fi
# Extract the value of EDITOR
[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="`. /etc/conf.d/basic 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="/bin/nano"
export EDITOR |
_________________ C. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tiro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1106020249424dc447a108b.jpg)
Joined: 14 Feb 2003 Posts: 752 Location: italy
|
Posted: Tue May 03, 2005 11:02 am Post subject: |
|
|
quindi se ho capito bene /etc/profile è deprecato ?? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CarloJekko Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/17829012804368ad2e5dc22.jpg)
Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Tue May 03, 2005 11:54 am Post subject: |
|
|
assolutamente no... ad esempio nel caso di multi utente... .bashrc è solo un file in cui si caricano delle impostazioni utente _________________ C. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tiro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1106020249424dc447a108b.jpg)
Joined: 14 Feb 2003 Posts: 752 Location: italy
|
Posted: Tue May 03, 2005 2:26 pm Post subject: |
|
|
ah ok..! mi aveva preso un colpo!!! ![Laughing :lol:](images/smiles/icon_lol.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ogeidix n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 14 Sep 2004 Posts: 69
|
Posted: Tue May 03, 2005 5:46 pm Post subject: |
|
|
anchio ho un problema simile ...
probabilmente a partire dall'ultimo aggiornamento di sistema
non ho più il prompt colorato da root ! (da utente invece è tutto ok)
Code: | root@localhost ~ # emerge -p bash
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] app-shells/bash-3.0-r9
|
Qualcuno ha qualche idea sul perchè?
(il file .bashrc è ok) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dappiu Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Southpark/avatar20.gif)
Joined: 14 Mar 2005 Posts: 242 Location: Pisa, Italy
|
Posted: Tue May 03, 2005 6:06 pm Post subject: |
|
|
ogeidix wrote: |
Qualcuno ha qualche idea sul perchè?
(il file .bashrc è ok) |
non controllare solo /home/*utente*/.bashrc
Controlla che anche il file /root/.bashrc sia a posto (sempre che tu non l'abbia gia fatto) _________________ If the human brain were so simple that we could understand it, we would be so simple we couldn't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
koma Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/208407359441b4bbd170574.jpg)
Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CarloJekko Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/17829012804368ad2e5dc22.jpg)
Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Tue May 03, 2005 9:12 pm Post subject: |
|
|
infatti è li che si trovano le impostazioni dei colori sia del testo standard che del PS1 _________________ C. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|