LINUX.ORG.RU

tty


0

1

Погите решить такую проблему. При входе в tty , после логина, выдается такое. Как лечить?

-bash: zstyle: command not found                                                                                               -bash: zstyle: command not found                                                                                          -bash: zstyle: command not found  
-bash: zstyle: command not found                                                                                                -bash: zstyle: command not found                                                                                                -bash: zstyle: command not found                                                                                                -bash: zstyle: command not found                                                                                                -bash: autoload: command not found                                                                                              -bash: autoload: command not found                                                                                              -bash: [[: [colors]: syntax error: operand expected (error token is "[colors]")                                                 -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: %{$terminfo[bold]$fg[${(L)color}]%}: bad substitution                                                                    -bash: %{$fg[${(L)color}]%}: bad substitution                                                                                   -bash: local: can only be used in a function                                                                                    -bash: local: can only be used in a function                                                                                    -bash: local: can only be used in a function                                                                                    -bash: local: can on



Последнее исправление: paint (всего исправлений: 1)

Посмотрите что вы прописали в ваш .bashrc, .bash_profile или /etc/bash/bashrc .

Где-то у вас прописан вызов скрипта, который, к тому же криво написан.

kostik87 ★★★★★
()
Ответ на: комментарий от kostik87
[asharov@netbook~]$ cat .bash_profile 
#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
[asharov@netbook~]$ cat .bashrc 
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h\W]\$ '
[asharov@netbook~]$ cat /etc/bash.bashrc 
#
# /etc/bash.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '

case ${TERM} in
  xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
                                                        
    ;;
  screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    ;;
esac

[ -r /usr/share/bash-completion/bash_completion   ] && . /usr/share/bash-completion/bash_completion
paint
() автор топика
Ответ на: комментарий от paint

Ну и зачем вы это всё сюда выложили ?

Других файлов, в которых указаны выполняемые команды при запуске bash нет. Разбирайтесь что откуда тянется. Для начала можете их всех переименовать и после чего выйти из системы и зайти снова.

kostik87 ★★★★★
()
Ответ на: комментарий от kostik87

Попробовал сейчас их все почерёдно удалять и пробовать логиниться. Ничего,все так же. Такая петрушка началась после установки zsh и удаления онного.

paint
() автор топика
Ответ на: комментарий от NeXTSTEP
/home/asharov/.zcompdump:'zstyle' '_zstyle'
/home/asharov/.zcompdump:            _zpty _zsh-mime-handler _zstyle _ztodo
Binary file /home/asharov/.cache/chromium/Default/Cache/data_1 matches
Binary file /home/asharov/.config/chromium/Default/Shortcuts matches
Binary file /home/asharov/.config/chromium/Default/History matches
Binary file /home/asharov/.config/chromium/Default/History Provider Cache matches
Binary file /home/asharov/.config/chromium/Default/Favicons matches
/home/asharov/zshrcconfig:zstyle ':completion::complete:*' use-cache on
/home/asharov/zshrcconfig:zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
/home/asharov/zshrcconfig:zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
/home/asharov/zshrcconfig:zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
/home/asharov/zshrcconfig:zstyle ':completion:*' menu select=1 _complete _ignored _approximate
/home/asharov/zshrcconfig:zstyle -e ':completion:*:approximate:*' max-errors \
/home/asharov/zshrcconfig:zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
/home/asharov/zshrcconfig:zstyle ':completion:*::::' completer _expand _complete _ignored _approximate
/home/asharov/zshrcconfig:zstyle -e ':completion:*:approximate:*' max-errors \
/home/asharov/zshrcconfig:zstyle ':completion:*:expand:*' tag-order all-expansions
/home/asharov/zshrcconfig:zstyle ':completion:*' verbose yes
/home/asharov/zshrcconfig:zstyle ':completion:*:descriptions' format '%B%d%b'
/home/asharov/zshrcconfig:zstyle ':completion:*:messages' format '%d'
/home/asharov/zshrcconfig:zstyle ':completion:*:warnings' format 'No matches for: %d'
/home/asharov/zshrcconfig:zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
/home/asharov/zshrcconfig:zstyle ':completion:*' group-name ''
/home/asharov/zshrcconfig:zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
/home/asharov/zshrcconfig:zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
/home/asharov/zshrcconfig:zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
/home/asharov/zshrcconfig:zstyle ':completion:*:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
/home/asharov/zshrcconfig:zstyle ':completion:*:processes-names' command 'ps axho command'
grep: /etc/pacman.d/gnupg/random_seed: Permission denied
grep: /etc/pacman.d/gnupg/secring.gpg: Permission denied
grep: /etc/crypttab: Permission denied
grep: /etc/.pwd.lock: Permission denied
grep: /etc/shadow: Permission denied
grep: /etc/polkit-1/rules.d: Permission denied
grep: /etc/gshadow: Permission denied
grep: /etc/ssh/ssh_host_dsa_key: Permission denied
grep: /etc/ssh/ssh_host_key: Permission denied
grep: /etc/ssh/ssh_host_ecdsa_key: Permission denied
grep: /etc/ssh/ssh_host_rsa_key: Permission denied
grep: /etc/sudoers: Permission denied
grep: /etc/shadow-: Permission denied
grep: /etc/gshadow-: Permission denied
grep: /etc/passwd-: Permission denied
/etc/profile:zstyle ':completion::complete:*' use-cache on
/etc/profile:zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
/etc/profile:zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
/etc/profile:zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
/etc/profile:zstyle ':completion:*' menu select=1 _complete _ignored _approximate
/etc/profile:zstyle -e ':completion:*:approximate:*' max-errors \
/etc/profile:zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
/etc/profile:zstyle ':completion:*::::' completer _expand _complete _ignored _approximate
/etc/profile:zstyle -e ':completion:*:approximate:*' max-errors \
/etc/profile:zstyle ':completion:*:expand:*' tag-order all-expansions
/etc/profile:zstyle ':completion:*' verbose yes
/etc/profile:zstyle ':completion:*:descriptions' format '%B%d%b'
/etc/profile:zstyle ':completion:*:messages' format '%d'
/etc/profile:zstyle ':completion:*:warnings' format 'No matches for: %d'
/etc/profile:zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
/etc/profile:zstyle ':completion:*' group-name ''
/etc/profile:zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
/etc/profile:zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
/etc/profile:zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
/etc/profile:zstyle ':completion:*:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
/etc/profile:zstyle ':completion:*:processes-names' command 'ps axho command'
grep: /etc/sudoers.d: Permission denied
grep: /etc/group-: Permission denied
[asharov@netbook~]$ grep -Fr '%{$fg[${(L)color}]%}' ~ /etc
Binary file /home/asharov/.config/chromium/Default/Shortcuts matches
Binary file /home/asharov/.config/chromium/Default/History matches
Binary file /home/asharov/.config/chromium/Default/History Provider Cache matches
/home/asharov/zshrcconfig:   eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
grep: /etc/pacman.d/gnupg/random_seed: Permission denied
grep: /etc/pacman.d/gnupg/secring.gpg: Permission denied
grep: /etc/crypttab: Permission denied
grep: /etc/.pwd.lock: Permission denied
grep: /etc/shadow: Permission denied
grep: /etc/polkit-1/rules.d: Permission denied
grep: /etc/gshadow: Permission denied
grep: /etc/ssh/ssh_host_dsa_key: Permission denied
grep: /etc/ssh/ssh_host_key: Permission denied
grep: /etc/ssh/ssh_host_ecdsa_key: Permission denied
grep: /etc/ssh/ssh_host_rsa_key: Permission denied
grep: /etc/sudoers: Permission denied
grep: /etc/shadow-: Permission denied
grep: /etc/gshadow-: Permission denied
grep: /etc/passwd-: Permission denied
/etc/profile:   eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
grep: /etc/sudoers.d: Permission denied
grep: /etc/group-: Permission denied

теперь эти файлы сносить?

paint
() автор топика
Ответ на: комментарий от NeXTSTEP

Понял где трабла, в /etc/profile. Надо бы найти дефолтный...

paint
() автор топика
Ответ на: комментарий от NeXTSTEP

Спасибо! Решил проблему! Ну и zsh...

paint
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.