Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Term a colori anche da Root - Come? [risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
vcam
n00b
n00b


Joined: 20 Sep 2003
Posts: 39
Location: Milano prov.

PostPosted: Sun Jun 12, 2005 6:54 pm    Post subject: Term a colori anche da Root - Come? [risolto] Reply with quote

Dopo aver emerso baselayout alla versione 1.11.12-r4, fra i tanti cambiamenti effettuati, mi ritrovo con il terminale senza più i colori :? .

Ho cercato invano di capire dove lo stramaledetto script /etc/bash/bashrc setta l'utente root in mono, ma non ci sono riuscito.

Qualcuno mi puo' aiutare indicandomi dove modificare lo script, oppure indicandomi dove posso trovare documentazione (recente) che sia comprensibile ad un profano come me.

(sto ribaltamento del baseleyout proprio non l'ho gradito... ora che avevo memorizzato cosa fare con i vecchi file.. sigh! :cry: )

Bye Vcam (Fabio)


Last edited by vcam on Sun Jun 12, 2005 8:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
thewally
l33t
l33t


Joined: 12 May 2005
Posts: 703
Location: Genova

PostPosted: Sun Jun 12, 2005 8:01 pm    Post subject: Reply with quote

Se intendi che vuoi avere il terminale di root a colore per root, devi mettere alias ls="ls --color", it /root/.bashrc

Il mio, per esempio...
Code:
nemo ~ # cat /root/.bashrc
alias ls="ls --color"


The Wally
Back to top
View user's profile Send private message
vcam
n00b
n00b


Joined: 20 Sep 2003
Posts: 39
Location: Milano prov.

PostPosted: Sun Jun 12, 2005 8:21 pm    Post subject: Reply with quote

thewally wrote:
Se intendi che vuoi avere il terminale di root a colore per root, devi mettere alias ls="ls --color", it /root/.bashrc

Il mio, per esempio...
Code:
nemo ~ # cat /root/.bashrc
alias ls="ls --color"


The Wally


Ok grazie per avermi fatto accorgere della svista... " --color " ecco cosa mancava.. :oops:
Quindi e' colpa mia perche' dopo aver accettato i cambiamenti proposti da etc-update ai file "bashrc", ho riscritto a manina gli alias che mi interessavano, omettendo il parametro [ --color ]
:oops: Che dire... svista da superniubbo :oops:

L'unica eccezione è che io setto /etc/bash/bashrc al posto di /root/.bashrc

Grazie Vcam (fabio)
Back to top
View user's profile Send private message
teknux
Guru
Guru


Joined: 19 Feb 2003
Posts: 517
Location: Rome, IT

PostPosted: Mon Jun 13, 2005 12:45 pm    Post subject: Reply with quote

forse sarebbe meglio un:
Code:

alias ls='ls --color=auto'


se può interessarti, funzia anche con grep:
Code:

alias grep='grep --color=auto'


saluti,
tek
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Mon Jun 13, 2005 12:52 pm    Post subject: Reply with quote

teknux wrote:
funzia anche con grep:


8O
Non ci avevo mai fatto caso.... thx :-D
_________________
Ciao da me!
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Mon Jun 13, 2005 2:57 pm    Post subject: Reply with quote

A me non ha mai funzionato :cry: indipendentemente dal nuovo baselayout

/root/.bashrc
Code:
alias ls="ls --color=auto"


Non funziona...
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
nick_spacca
l33t
l33t


Joined: 29 May 2004
Posts: 689
Location: Paris/France

PostPosted: Mon Jun 13, 2005 3:08 pm    Post subject: Reply with quote

teknux wrote:
(...)
se può interessarti, funzia anche con grep:
Code:

alias grep='grep --color=auto'


saluti,
tek


Grande...questa davvero non la sapevo....
Certo, non e' di grande utilita'....MA QUANTO MI PIACCIONO QUESTE COSINE INUTILI....8)
_________________
I can resist anything but temptation.
(O. Wilde)
Back to top
View user's profile Send private message
vcam
n00b
n00b


Joined: 20 Sep 2003
Posts: 39
Location: Milano prov.

PostPosted: Mon Jun 13, 2005 4:40 pm    Post subject: Reply with quote

Confermo che anch'io godo di queste comodissime inutilita', anzi se non ci sono mi sento disorientato :P

Teknux, grazie per la dritta di grep a colori.

Mi spiace mrfree... prova cosi:

Io non setto il file /root/.bashrc, ma inserisco gli alias nel file /etc/bash/bashrc
Io non ho il file /root/.bashrc
Io attualmente alla fine del file /etc/bashrc ho inserito le seguenti righe:

Code:
#################################################
#
alias ls="ls --color=auto"
alias lsm="ls --color=auto | more"
alias la="ls --color=auto -a"
alias lam="ls --color=auto -a | more"
alias ll="ls --color=auto -l"
alias llm="ls --color=auto -l | more"
alias lla="ls --color=auto -la"
alias llam="ls --color=auto -la | more"
#
alias grep='grep --color=auto'
#
alias na="nano -w"
alias cc="clear"
alias cd..="cd .."
alias ee="env-update && source /etc/profile"
alias plog="cd /var/log/portage"
alias ce="cd /etc"
alias ck="cd /usr/src"
alias cf="cd /etc/conf.d"
#
alias dmon="DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text 5"
#
#################################################


Prova e posta se cosi' funziona.

Per ora Bye, Vcam (Fabio)
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Mon Jun 13, 2005 4:52 pm    Post subject: Reply with quote

per farlo andare ho dovuto rinominare il file .bashrc contenente gli alias in .bash_profile adesso funzia ;)
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
nick_spacca
l33t
l33t


Joined: 29 May 2004
Posts: 689
Location: Paris/France

PostPosted: Mon Jun 13, 2005 5:23 pm    Post subject: Reply with quote

mrfree wrote:
per farlo andare ho dovuto rinominare il file .bashrc contenente gli alias in .bash_profile adesso funzia ;)


se non sbaglio il file .bash_profile serve per quando ci si logga su console (o eventualmente in ssh...)

Io comunque per comodita' faccio sempre un link simbolico tra .bashrc e .bash_profile ....cosi' aggiorno sempre e solo uno alla volta...
_________________
I can resist anything but temptation.
(O. Wilde)
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Tue Jun 14, 2005 7:20 am    Post subject: Reply with quote

Il man di bash riporta:
Quote:
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
The individual per-interactive-shell startup file


Quindi il .bash_profile è una sorta di /etc/profile locale (personale), mentre questa cosa della per-interactive-shell non mi è molto chiara
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Tue Jun 14, 2005 8:16 am    Post subject: Reply with quote

mrfree wrote:
Quindi il .bash_profile è una sorta di /etc/profile locale (personale), mentre questa cosa della per-interactive-shell non mi è molto chiara


Se fai una ricerca il forum é pieno di post relativi.
Una buona spiagazione é: https://forums.gentoo.org/viewtopic-p-1242124.html#1242124
_________________
Ciao da me!
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Tue Jun 14, 2005 9:20 am    Post subject: Reply with quote

si in effetti non mi sono interessato particolarmente alla questione, sorry
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2495
Location: イタリアのロディで

PostPosted: Fri Aug 11, 2006 8:07 am    Post subject: Reply with quote

Funziona una cosa del genere anche con less e/o more?
Sarebbe utile davvero.

Grazie 1000.

Andrea
_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Fri Aug 11, 2006 9:43 pm    Post subject: Reply with quote

bandreabis wrote:
Funziona una cosa del genere anche con less e/o more?


Definisci "una cosa del genere".
_________________
Ciao da me!
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2495
Location: イタリアのロディで

PostPosted: Fri Aug 11, 2006 10:46 pm    Post subject: Reply with quote

Esempio, se voglio vedere cosa vuole aggiornarmi emerge e le dipendenze sono tante, di solito do
Code:
emerge |less
ma mi da l'output tutto bianco... vorrei vederlo a colori come il classico emerge. :P
_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
klaimath
Apprentice
Apprentice


Joined: 18 Jun 2006
Posts: 213

PostPosted: Mon Aug 21, 2006 7:42 pm    Post subject: Reply with quote

Scusate ma non è più semplice metterli in /etc/profile tutti questi alias ?
Alla fin fine siete sempre voi che usate il sistema, sia come utente root che normale, e quindi potrebbe essere più veloce settarli 1 volta per tutti gli utenti.

P.S.
Io li setto in /etc/profile anche per le macchine usate da più di una persona tanto sono inutilità che piacciono a tutti e non sono pericolose per il sistema.

Saluti
Adriano
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
Page 1 of 1

 
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