I'm trying to get the profile directory of the default firefox profile (the one that opens automatically) from Bash. How could I proceed? I can't find any useful options issuing firefox --help
Firefox – Get the Default Firefox Profile Directory from Bash
bashfirefox
Best Answer
Try
grep 'Path=' ~/.mozilla/firefox/profiles.ini | sed s/^Path=//
. Default profile folder name is stored inprofiles.ini
. This will work fine while you've got single profile.If you have more than one Firefox profile then the file format changes, so extracting the folder name becomes more tricky. Here's the script to do that:
This script will work in both cases, it selects the appropriate method depending on the amount of profiles. Works in OSX, too.