AJuda com terminal [RESOLVIDO]

1. AJuda com terminal [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 14/06/2011 - 16:01h

galera não sei se isso afeta em algo, porem td vez q inicio meu terminal, ele aparece essa msg :

bash: enable: bash: not a shell builtin
bash: enable: completion: not a shell builtin
bash: enable: in: not a shell builtin
bash: enable: interactive: not a shell builtin
bash: enable: shells: not a shell builtin


  


2. Re: AJuda com terminal [RESOLVIDO]

Marcos Paulo Ferreira
daemonio

(usa Slackware)

Enviado em 15/06/2011 - 17:19h

Aí jukinha, cole o conteúdo de seu arquivo ~/.bashrc. Suponho que haja algumas
instruções inválidas nele.

t+


3. Re: AJuda com terminal [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 15/06/2011 - 17:23h

tai jow :

.bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[{TTEXTO}33[01;32m\]\u@\h\[{TTEXTO}33[00m\]:\[{TTEXTO}33[01;34m\]\w\[{TTEXTO}33[00m\]\$ '
else
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

PS1='\[\e[1;32m\]\u \[\e[1;34m\]\w \[\e[1;32m\]\$ \[\e[0;37m\] '

fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi



4. Re: AJuda com terminal [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 17/06/2011 - 09:49h

ninguem p/ me ajudar??


5. Re: AJuda com terminal [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 17/06/2011 - 10:14h

Ok, achei o seu problemas, olhando esse fórum (http://ubuntuforums.org/showthread.php?t=291295)

Bom veja de dentro do diretório /etc
tem um arquivo bash.bashrc.dpkg.old

Se não tiver não tem problema, use o conteúdo abaixo, copiei do meu:
===============================================================
# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
# PROMPT_COMMAND='echo -ne "{TEXTO}33]0;${USER}@${HOSTNAME}: ${PWD}{TEXTO}07"'
# ;;
#*)
# ;;
#esac

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi

# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found ]; then
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/bin/python /usr/lib/command-not-found -- $1
return $?
elif [ -x /usr/share/command-not-found ]; then
/usr/bin/python /usr/share/command-not-found -- $1
return $?
else
return 127
fi
}
fi
=======================================================
Cole isso num arquivo e nomeie ele como bash.bashrc

Depois é só renomear o seu, fazendo:

sudo mv /etc/bash.bashrc bash.bashrc_problematico

e coloque o novo no lugar dele

sudo mv bash.bashrc /etc

Abraços


6. Re: AJuda com terminal [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 17/06/2011 - 10:19h

esse arquivo bash.bashrc tem alguma coisa a ver com esse: .bashrc ??

pq mudei umas coisas la pra mudar a cor do terminal, terei que colocar as config que editei nesse bash.bashrc ???


7. Re: AJuda com terminal [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 17/06/2011 - 10:32h

Não, e se você mudou o seu ~/.bashrc, veja direitinho porque é ai a chave do problema, pois se antes não acontecia nada e agora dar esse erro, e você mudou algo..... basta ver o que você mudou, pode está ocasionando erro.

O que te passei não é o mesmo ~/.bashrc, ele é o bash.bashrc GERAL fica dentro do /etc.


Abraços


8. Re: AJuda com terminal [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 17/06/2011 - 10:33h

entao mais o meu .bashrc eu so mudei a opção la pro nome de login ficar de uma cor, e o root de outra.. nao mexi em mais nada, e esse erro esta dando , desde que eu instalei o debian, antes de mexer no .bashrc


9. Re: AJuda com terminal [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 17/06/2011 - 10:38h

Ok, vamos com calma, muda primeiro o seu /etc/bash.bashrc

E veja se funciona.




10. Re: AJuda com terminal [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 17/06/2011 - 16:15h

Amigao coloquei sei bash la no /etc/bash.bashrc

deu certo no login de user, mas qndo digito 'su - ' p logar como root, aparece isso :

-su: alias: `ls --color': invalid alias n


11. Re: AJuda com terminal [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 17/06/2011 - 21:51h

Ok, estou passando mais 2 para arrumar tudo por ai :-)

BASHRC do ROOT, colocar em /root
=========================================
# ~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'



12. Re: AJuda com terminal [RESOLVIDO]

Raimundo Alves Portela
rai3mb

(usa Outra)

Enviado em 17/06/2011 - 21:53h

Agora o bashrc do usuário, colocar no seu /home/seu_usuario:
===============================================
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[{TTEXTO}33[01;32m\]\u@\h\[{TTEXTO}33[00m\]:\[{TTEXTO}33[01;34m\]\w\[{TTEXTO}33[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

=========

Abraços



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts