Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[BASH] Mi sono scomparsi i colori [Risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Mon May 02, 2005 6:56 pm    Post subject: [BASH] Mi sono scomparsi i colori [Risolto] Reply with quote

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
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Mon May 02, 2005 7:03 pm    Post subject: Re: [BASH] Mi sono scomparsi i colori Reply with quote

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
View user's profile Send private message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Mon May 02, 2005 7:07 pm    Post subject: Reply with quote

prompt :|
koma@defaced #
è in bianco e nero invece emerge -s o simili sono a colori
_________________
http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD
Back to top
View user's profile Send private message
otaku
Guru
Guru


Joined: 16 Dec 2004
Posts: 428
Location: Rho (MI)

PostPosted: Mon May 02, 2005 8:56 pm    Post subject: Reply with quote

hai provato
Code:
env-update && source /etc/profile

?
_________________
Ventiquattr'ore al giorno in preda a una follia contorta...
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon May 02, 2005 11:18 pm    Post subject: Reply with quote

Prova con:

Code:

# mkdir /etc/bash
# mv /etc/bashrc /etc/bash/

_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Mon May 02, 2005 11:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Mon May 02, 2005 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Mon May 02, 2005 11:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Mon May 02, 2005 11:55 pm    Post subject: Reply with quote

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 ) :|
_________________
C.


Last edited by CarloJekko on Tue May 03, 2005 12:20 am; edited 2 times in total
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Tue May 03, 2005 12:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Tue May 03, 2005 12:17 am    Post subject: Reply with quote

scusatemi tutti... probabilmente è l'ora tarda...
dopo aver digitato due lettere e poi un'altra parolina
Code:
su
password

sono riuscito a digitare
Code:
env-update

(che vergogna :cry: :cry: :cry: adesso tutti voi riderete di me:cry: :cry: :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
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Tue May 03, 2005 12:18 am    Post subject: Reply with quote

se usi konsole prova
konsole -ls
cmq credo proprio che sia 1 questione di export PS1=....
_________________
C.
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Tue May 03, 2005 12:24 am    Post subject: Reply with quote

si con
Code:
konsole -ls

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
View user's profile Send private message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Tue May 03, 2005 12:42 am    Post subject: Reply with quote

ho trovato la gabella!!! la la la la la

Code:
cp /etc/bash/bashrc /etc

_________________
http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Tue May 03, 2005 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Tue May 03, 2005 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Tue May 03, 2005 7:24 am    Post subject: Reply with quote

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
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Tue May 03, 2005 9:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Tue May 03, 2005 11:02 am    Post subject: Reply with quote

quindi se ho capito bene /etc/profile è deprecato ??
Back to top
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Tue May 03, 2005 11:54 am    Post subject: Reply with quote

assolutamente no... ad esempio nel caso di multi utente... .bashrc è solo un file in cui si caricano delle impostazioni utente
_________________
C.
Back to top
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Tue May 03, 2005 2:26 pm    Post subject: Reply with quote

ah ok..! mi aveva preso un colpo!!! :lol:
Back to top
View user's profile Send private message
ogeidix
n00b
n00b


Joined: 14 Sep 2004
Posts: 69

PostPosted: Tue May 03, 2005 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
dappiu
Apprentice
Apprentice


Joined: 14 Mar 2005
Posts: 242
Location: Pisa, Italy

PostPosted: Tue May 03, 2005 6:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Tue May 03, 2005 6:36 pm    Post subject: Reply with quote

io son arrivato alla soluzione leggento /etc/profile cosa che vi consiglio ^_^
_________________
http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD
Back to top
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Tue May 03, 2005 9:12 pm    Post subject: Reply with quote

infatti è li che si trovano le impostazioni dei colori sia del testo standard che del PS1
_________________
C.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum