Fastfetch won't launch by default

Running latest version of gnome testing and have gnome terminal. I have fastfetch, neofetch and screenfetch and they all work fine when launched from terminal.
I’ve tried added all of them ( one at a time) to both my home/.bashrc and etc/bash.bashrc but all of them fail to launch by default when i open my terminal.
Am i missing something stupid as I’ve never had the problem before

Summary

`

~/.bashrc

If not running interactively, don’t do anything

[[ $- != i ]] && return

colors() {
local fgc bgc vals seq0

printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value  1 gives a  \e[1mbold-faced look\e[m\n\n"

# foreground colors
for fgc in {30..37}; do
	# background colors
	for bgc in {40..47}; do
		fgc=${fgc#37} # white
		bgc=${bgc#40} # black

		vals="${fgc:+$fgc;}${bgc}"
		vals=${vals%%;}

		seq0="${vals:+\e[${vals}m}"
		printf "  %-9s" "${seq0:-(default)}"
		printf " ${seq0}TEXT\e[m"
		printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
	done
	echo; echo
done

}

[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion

Change the window title of X terminals

case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.}:${PWD/#$HOME/~}\007"’
;;
screen
)
PROMPT_COMMAND=‘echo -ne “\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\”’
;;
esac

use_color=true

Set colorful PS1 only on colorful terminals.

dircolors --print-database uses its own built-in database

instead of using /etc/DIR_COLORS. Try to use the external file

first to take advantage of user additions. Use internal bash

globbing instead of external grep binary.

safe_term=${TERM//[[1]]/?} # sanitize TERM
match_lhs=“”
[[ -f ~/.dir_colors ]] && match_lhs=“${match_lhs}$(<~/.dir_colors)”
[[ -f /etc/DIR_COLORS ]] && match_lhs=“${match_lhs}$(</etc/DIR_COLORS)”
[[ -z ${match_lhs} ]]
&& type -P dircolors >/dev/null
&& match_lhs=$(dircolors --print-database)
[[ $‘\n’${match_lhs} == $‘\n’"TERM "${safe_term} ]] && use_color=true

if ${use_color} ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
fi

if [[ ${EUID} == 0 ]] ; then
	PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
else
	PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi

alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'

else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don’t have colors
PS1=‘\u@\h \W $ ’
else
PS1=’\u@\h \w $ ’
fi
fi

unset use_color safe_term match_lhs sh

#alias cp=“cp -i” # confirm before overwriting something
#alias df=‘df -h’ # human-readable sizes
#alias free=‘free -m’ # show sizes in MB
#alias np=‘nano -w PKGBUILD’
#alias more=less

xhost +local:root > /dev/null 2>&1

Bash won’t get SIGWINCH if another process is in the foreground.

Enable checkwinsize so that bash will check the terminal size when

it regains control. #65623

http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)

shopt -s checkwinsize

shopt -s expand_aliases

export QT_SELECT=4

Enable history appending instead of overwriting. #139609

shopt -s histappend

fastfetch`


  1. :alnum: ↩︎

Are you actually using bash as default? Most people are using zsh these days (for whatever reason). Try typing bash in the terminal if not, see if it shows up then.

EDIT: If you prefer zsh, you will need to make the changes to the appropriate configuration file e.g. ~/.zshrc but note that I don’t use zsh; don’t even have it on this system (it’s an old install) but those files are present on the other one. I’d hang on for someone who does use zsh for confirmation.

1 Like

Possibly.

Add a simple command to your ~/.bash_profile, or ~/.bashrc (if using bash), or ~/.zshrc (if using zsh).

That command in the case of fastfetch… is… fastfetch.

Don’t miss this step: logout/Login or Reboot:eyes:

Cheers.

Please do not post screenshots of text. You’ve been around long enough to know better. :wink: Please edit your post accordingly.

2 Likes

sorry, it was just to show i’d actually added it to the bashrc file. Anyway I’m pretty sure default gnome is bash but I added the command to my .zshrc file as well and now it works. So thanks to everyone who replied, it was just driving me nuts something so simple wasn’t working

So you arent using bash and you were adding it to the bash configuration file.
(as that was first mentioned by BG405 that post has been marked as the solution)

It is not.

3 Likes

We’ll believe you if you paste text as well. :wink:

/me clears throat loudly

…otherwise the screeshot will be removed for you so forum backups are smaller. :wink:

3 Likes

I always thought gnome shipped with bash by default? What i don’t understand is my zshrc file is almost empty yet all my customisation like window size, font, text colour etc is in the bashrc file not my zshrc file. I’d looked in the zshrc file and as none of my changes were in it i presumed gnome was still bash.(Hope that makes sense)

I’ve not had to do a fresh install of anything for 4 year’s, been happily running cinnamon with zero issues but upgraded to a 2-in-1 laptop and gnome is the only DE that works properly out of the box in tablet mode so got to learn gnome now and sill struggling with it a little

GNOME may ship with bash by default;
but is bash enabled by default?

I haven’t used GNOME in (not long enough) so, I don’t recall. If you have never changed your shell, this command should show the current default, and by extrapolation, the installed default:

echo $SHELL

Cheers.

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.