July 10, 2015

162 words 1 min read

fish: Unable to create a configuration directory for fish.

Terminal_Logo_CRT_Small
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.

sQOrznY
Simple to check:

  • echo $HOME — says/home/jdavis — which is right
  • echo $XDG_CONFIG_HOME — Blank
  • ls -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.