See https://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files
When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile
, if that file exists. After reading that file, it looks for ~/.bash_profile
, ~/.bash_login
, and ~/.profile
, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.
Note, no mention of ~/.bashrc
above.
When an interactive shell that is not a login shell is started, Bash reads and executes commands from ~/.bashrc
, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force Bash to read and execute commands from file instead of ~/.bashrc.
Check your terminal application's preferences to see if it launches a login shell or not.
Alternately, you can add this to your ~/.bash_profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
Your ~/.config/user-dirs.dirs
file has some incorrect settings, in particular you have lost the correct setting for 'DESKTOP'. Possibly others have been changed as well and may need some editing, (the contents of your ~/.config/user-dirs.dirs
file will reveal this).
My own ~/.config/user-dirs.dirs
file is as follows:
andrew@ithaca:~$ cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
andrew@ithaca:~$
You can certainly edit the file directly as is suggested above but another way to correct the missing entries in your own file is to run the following commands one after the other from a Terminal window:
xdg-user-dirs-update --set DESKTOP "$HOME/Desktop"
xdg-user-dirs-update --set DOWNLOAD "$HOME/Downloads"
xdg-user-dirs-update --set TEMPLATES "$HOME/Templates"
xdg-user-dirs-update --set DOCUMENTS "$HOME/Documents"
xdg-user-dirs-update --set PICTURES "$HOME/Pictures"
xdg-user-dirs-update --set VIDEOS "$HOME/Videos"
Then logout and subsequently login or simply reboot, and all should be well. For reference here are all of the values that can be manipulated in this way:
DESKTOP
DOWNLOAD
TEMPLATES
PUBLICSHARE
DOCUMENTS
MUSIC
PICTURES
VIDEOS
The commands I have given you should return you to the defaults, and to remove the $HOME icon from the Desktop:
gsettings set org.gnome.nautilus.desktop home-icon-visible false
References:
Best Answer
Based on your screenshot, it appears that the files are indeed being displayed. It's just that they happen to have the same color as the background so you are not seeing them.
Some solutions:
1) (recommended) Change the color scheme: Make sure nothing shares the same color as the background by opening a terminal and go to
Edit
>Profile Preferences
>Colors
tab.-OR-
2) Change your background color: Follow instructions from (1).
-OR-
3) Stop
ls
from printing in different colors: Go into your~/.bashrc
file and locate the line that saysalias ls='ls --color=auto'
. Comment it out by typing#
in front of it.