0

A mysterious '~' directory recently appeared inside my home directory (as in ~/~). Inside I found a single hidden directory .confit which contained a single directory chromium. Inside that ~/~/.confit/chromium directory were several of the same contents as ~/.config/chromium. I have been using Chromium for years and this is the first time I have seen this behavior. Has anyone else encountered this? I can delete the '~' directory but it comes back every time I launch Chromium. I wish I could identify exactly when it started, but I have already deleted it several times and I don't remember exactly when it first appeared. What determines where Chromium saves its config files? server-side settings? source code? I don't even know where to look. I'm running Arch Linux in case that matters.

Edit: Is it possible that the error could be in my configs for an Electron app rather than Chromium itself?

Edit: $CHROME_CONFIG_HOME is not set and I set $XDG_CONFIG_HOME to /home/(my username)/.config when I was first troubleshooting this issue. It didn't change anything.

7
  • 1
    Check your environment (env) for anything with ~ in the value.
    – D. SM
    Commented Oct 30, 2020 at 4:33
  • 1
    If you use ~ in any of the dotfiles, it may need to be replaced with $HOME.
    – D. SM
    Commented Oct 30, 2020 at 4:34
  • 1
    It's not only the initial ~ but also the confit where t is close to g on the keyboard, and this is an indication for a typo while doing some activity, for example like this. Also it seems that no other program is writing anything under that directory, so I don't expect this issue to come from a system global variable but from something Chromium specific.
    – thanasisp
    Commented Oct 30, 2020 at 16:19
  • 1
    Also see here: chromium.googlesource.com/chromium/src.git/+/62.0.3202.58/docs/… and report if you have set $CHROME_CONFIG_HOME and $XDG_CONFIG_HOME.
    – thanasisp
    Commented Oct 30, 2020 at 16:22
  • 1
    what about a bruteforce approach? fgrep -r .confit ~ ?
    – A.B
    Commented Nov 4, 2020 at 16:26

1 Answer 1

1

I found it. User error sure enough. My i3 config file was the culprit. I had keybindings set to launch chromium with flag --user-data-dir=~/.confit/chromium/... Really obvious in hindsight. Changed it to --user-data-dir=$HOME/.config/chromium/... and it works correctly now. Thanks for all the help!

3
  • 2
    Apart from the typo, the problem is that even if the command is launched through a shell, the tilde won't be expanded there, in the middle of a word. Bash would expand it after the = in something that "looks like" a shell assignment. But --foo=~/bar doesn't fit that because the dashes aren't valid in a shell variable name.
    – ilkkachu
    Commented Nov 4, 2020 at 17:10
  • 1
    Yeah I forgot to mention that in my original answer. Updated it now. Thanks for the clarification! Commented Nov 4, 2020 at 21:19
  • When I try to use a data-dir in a path with a '.' in it, I get Failed to create a ProcessSingleton for your profile directory. snap run chromium --user-data-dir=$HOME/foo/chromium-W3C/ works, but mv foo .foo; snap run chromium --user-data-dir=$HOME/.foo/chromium-W3C/ fails. I'm jealous that you get to use the customary .config dir.
    – ericP
    Commented Feb 3, 2022 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .