-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error when loading bash console #232
Comments
I do get those errors myself sometimes. I guess I have to make the script a
bit more resilient to accommodate different environments. The culprit is
usually one of the monitors in the greeter; which in your case seems to be
the temperature monitor since it is not displayed. Try disabling it in the
configuration. If the error then disappears (we confirm its the temperature
monitor) you might be able to fix it installing `lm-sensors`, which
includes the `sensors` command (I'm writing from memory).
Let me know if you make any progress ;)
…On Wed, Aug 31, 2022 at 5:52 PM Ignacio Baptista ***@***.***> wrote:
*Describe the bug*
I get a strange error when loading my bash.
*The error is:*
(standard_in) 1: syntax error
(standard_in) 1: syntax error
*My system specs are:*
OS Linux Mint 20.3
Kernel 5.15.0-46-generic
CPU AMD Ryzen 5 3600 6-Core Processor
GPU NVIDIA Device 2487
*To Reproduce*
Steps to reproduce the behavior:
I just open my terminal and this error appears
*Expected behavior*
This error not happening
*Screenshots*
[image: image]
<https://user-images.githubusercontent.com/39410888/187721870-88684bf3-4642-4713-bafe-07b5c8a2297d.png>
*Additional context*
Here is my .bashrc complete file:
#!/bin/bash# ~/.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 anythingcase $- in
*i*) ;;
*) return;;esac
# don't put duplicate lines or lines starting with space in the history.# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite itshopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,# update the values of LINES and COLUMNS.shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will# match all files and zero or more directories and subdirectories.#shopt -s globstar
# 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|*-256color) 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=
fifi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ 'else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ 'fiunset color_prompt force_color_prompt
# If this is an xterm set the title to ***@***.***:dircase "$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 aliasesif [ -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
# colored GCC warnings and errors#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliasesalias ll='ls -alF'alias la='ls -A'alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:# sleep 10; alertalias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# 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_aliasesfi
# 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 ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fifi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
##-----------------------------------------------------## synth-shell-greeter.shif [ -f /home/nachiten/.config/synth-shell/synth-shell-greeter.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /home/nachiten/.config/synth-shell/synth-shell-greeter.shfi
##-----------------------------------------------------## synth-shell-prompt.shif [ -f /home/nachiten/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /home/nachiten/.config/synth-shell/synth-shell-prompt.shfi
##-----------------------------------------------------## better-lsif [ -f /home/nachiten/.config/synth-shell/better-ls.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /home/nachiten/.config/synth-shell/better-ls.shfi
##-----------------------------------------------------## aliasif [ -f /home/nachiten/.config/synth-shell/alias.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /home/nachiten/.config/synth-shell/alias.shfi
##-----------------------------------------------------## better-historyif [ -f /home/nachiten/.config/synth-shell/better-history.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /home/nachiten/.config/synth-shell/better-history.shfi
Here is my /etc/bash.barshrc complete file:
# 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)# but only if not SUDOing and have SUDO_PS1 set; then assume smart user.if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ 'fi
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.# If this is an xterm set the title to ***@***.***:dir#case "$TERM" in#xterm*|rxvt*)# PROMPT_COMMAND='echo -ne ""'# ;;#*)# ;;#esac
# enable bash completion in interactive shells#if ! shopt -oq posix; then# if [ -f /usr/share/bash-completion/bash_completion ]; then# . /usr/share/bash-completion/bash_completion# elif [ -f /etc/bash_completion ]; then# . /etc/bash_completion# fi#fi
# sudo hintif [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in *\ admin\ *|*\ sudo\ *)
if [ -x /usr/bin/sudo ]; then
cat <<-EOF To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. EOF
fi
esacfi
# if the command-not-found package is installed, use itif [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/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/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found" "$1" >&2
return 127
fi
}fi
##-----------------------------------------------------## better-lsif [ -f /usr/local/bin/better-ls.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /usr/local/bin/better-ls.shfi
##-----------------------------------------------------## aliasif [ -f /usr/local/bin/alias.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /usr/local/bin/alias.shfi
##-----------------------------------------------------## better-historyif [ -f /usr/local/bin/better-history.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /usr/local/bin/better-history.shfi
—
Reply to this email directly, view it on GitHub
<#232>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC36INRA3YPDLV7WEX4BRUTV355TZANCNFSM6AAAAAAQBQLEFA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I'm glad one issue is solved! :) |
Just to chime in with some additional information. I'm experiencing the same issue with similar cause. In my case, the output of sensors does not include a CPU temp. In your code for synth-shell-greeter.sh where you're grepping for Core to get 'temp_line', I have no string "Core" or any CPU information in my output:
Raw output:
|
Hi all. Let's solve one problem at a time. First the CPU temp issue. Thanks @derekscha for your output. I'll try to edit the script to make it handle odd situation like yours. Can you please confirm that none of those temps are related to the CPU? I'm seeing PCI stuff, GPU stuff and battery stuff... is that correct? As for the root issue, @Nachiten , can you try to create the root config folder+file manually? I'm 99% sure (from memory) that I made the script look at the aforementioned path. If the script does not find a config file, then it will revert to defaults. My take (to make it super easy) would be to copy your normal user's synth-shell config folder under ~/.config/ |
Hi, doing this copy command solved the issue Now my root loads the same config as my user, I can change it if needed. Now my last problem would be, being able to show my cpu temp. Thanks! |
Describe the bug
I get a strange error when loading my bash.
The error is:
My system specs are:
To Reproduce
Steps to reproduce the behavior:
I just open my terminal and this error appears
Expected behavior
This error not happening
Screenshots
Additional context
Here is my .bashrc complete file:
Here is my /etc/bash.barshrc complete file:
The text was updated successfully, but these errors were encountered: