1

I'm trying to run some programs with a different home directory. I've tried changing $HOME when running programs, however several programs I was testing with did not properly use the home directory. Firefox, Chromium, and notepadqq all used the "real" home directory instead of the one I passed as $HOME. This is an example of what I tried (with home directory name changed to user):

HOME=/home/user/home firefox

Running this results in creating a /home/user/home/.mozilla with a new profile and settings, but seemingly uses /home/user/.mozilla instead.

  • I believe Firefox configuration directory location is hardcoded, you cant' change it. AFAIK you can only change your profile directory location. However running HOME=/home/user/home firefox did work on my system. – Loïc Reynier Jun 22 at 7:23
  • Setting HOME won't affect applications that read the home directory form the passwd database. Your best bet would be to set up another real user. – Kusalananda Jun 22 at 10:49
  • @Kusalananda That seems like it could be the best, likely only option. I considered that as an alternative but was hoping for a way to fake the home directory for stubborn applications so all the files would still belong to my main account. – archfan Jun 22 at 17:59
  • Well, you could pasnibly use a chroot as an alternative. I'm not writing a proper answer as I don't have an appropriate Linux system to test things on (I'm assuming you're on Linux). – Kusalananda Jun 22 at 18:13
  • @Kusalananda Thanks, I'll probably just use the multiple accounts method since it seems simpler than setting up a chroot environment. – archfan Jun 22 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.