Recently I’ve taken a liking to Fish Shell. It’s simple, colorful and provides lots of features out of the box, without requiring any configuration whatsoever. Since I have a tendency to touch a lot of different systems, the “out of the box” provides a quick and clean environment to work with. However, today when I was setting up a new machine I ran into a new error message.
fish: Unable to create a configuration directory for fish. Your personal settings will not be saved. Please set the $XDG_CONFIG_HOME variable to a directory where the current user has write access.
Simple to check:
echo $HOME
— says/home/jdavis — which is rightecho $XDG_CONFIG_HOME
— Blankls -la ~/.config
— Ah, here’s the problem
Turns out I had run `fish
` first as root, so the ~/.config/ folder and its sub folders were owned by root. A quick `chown -R jdavis.jdavis ~/.config/
` fixed the issue. Just make sure you use your username rather than mine.