Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ Resuelto ] - .bashrc - asunto de...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Wed Aug 04, 2004 8:40 am    Post subject: [ Resuelto ] - .bashrc - asunto de... Reply with quote

Ahora acutalizé bash al 3.0-r4. Cuando todo termino, hice etc-update. En el pasado, he dejado que etc-update me acutalizara .bashrc so tambien lo hice esta ves. Antes que actualizara, cuando entraba al ambiente de 'su -', la parte "user@host" me salia en rojo mientras el ambiente de usuario me salia verde. Esto me dejaba conocer en qual ambiente estaba trabajando. Esto fue (yo creo porque yo no lo configure) una configuracion de defecto..

El problema.... Ahora.... los dos me salen verde..

Aquí esta el contenido de .bashrc de mi usuario
Code:
# /etc/skel/.bashrc:
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.8 2003/02/28 15:45:35 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

source /etc/profile

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"

# Change the window title of X terminals
case $TERM in
   xterm*|rxvt|Eterm|eterm)
      PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
      ;;
   screen)
      PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
      ;;
esac

##uncomment the following to activate bash-completion:
#[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion


.bashrc de root
Code:
  GNU nano 1.3.3                       File: .bashrc

# /etc/skel/.bashrc:
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.8 2003/02/28 15:45:35 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

source /etc/profile

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"

# Change the window title of X terminals
case $TERM in
        xterm*|rxvt|Eterm|eterm)
                PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
                ;;
        screen)
                PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
                ;;
esac

##uncomment the following to activate bash-completion:
#[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion


Y ulitimo,
Code:
# /etc/skel/.bashrc:
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.8 2003/02/28 15:45:35 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

source /etc/profile

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"

# Change the window title of X terminals
case $TERM in
        xterm*|rxvt|Eterm|eterm)
                PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
                ;;
        screen)
                PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
                ;;
esac

##uncomment the following to activate bash-completion:
#[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion


Ya mero argarro esta ordenador a puñetasos... =P He estado tratando ya por unas horas y ya me empiezan a salir canas..

Donde esta mi error?


Last edited by Ateo on Wed Aug 04, 2004 9:18 am; edited 1 time in total
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Wed Aug 04, 2004 9:17 am    Post subject: Reply with quote

feh..

Encontre el razon. baselayout cambio con su version nuevo.

Si le pasa lo mismo, reemplacé /etc/bash/bashrc con esto
Code:
# /etc/bash.bashrc:
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/bashrc,v 1.1 2004/07/22 02:30:30 agriffis Exp $
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.


# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]]; then
        # Shell is non-interactive.  Be done now
        return
fi

# Set colorful PS1 only on colorful terminals
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
else
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb'  ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
fi
export PS1


Que maldad deja que los usuarios y root que tengan el mismo prompt..

um.. como se dice prompt?? =)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish 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