Hacker Newsnew | past | comments | ask | show | jobs | submit | notafox's commentslogin

prefs.js is modified by browser itself. And it contains lots of stuff by default already.

You can store your custom preferences in user.js file - Firefox will copy those to prefs.js at startup.

From your link:

   The user.js[1] file is optional. If you have one whenever the application is started it will overwrite any settings in prefs.js with the corresponding settings from user.js. 
[1] https://kb.mozillazine.org/User.js_file


Also, I see options:

    geo.provider.use_corelocation: true/false # presumably for tracking on MacOS

    geo.provider.use_geoclue: true/false # presumably for tracking Linux users with Geoclue2 provider [1]

    geo.enabled: true/false # presumably, turns the whole thing off
Some say[2][3], use_ options take precedence over network.url, so you need to set those to false.

It also appears[3][4], that setting geo.provider.testing to true might be required.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1063572

[2] https://stackoverflow.com/questions/24932199/how-to-change-f...

[3] https://security.stackexchange.com/a/268825

[4] https://stackoverflow.com/a/24937564


Also profiles can be configured and used with CLI, no need for UI (old or new).

    ./firefox -CreateProfile "profile-name /home/user/.mozilla/firefox/profile-path/"
    ./firefox -profile "/home/user/.mozilla/firefox/profile-path/"
And, you can run it directly, no need to launch default firefox profile:

Given that /usr/bin/firefox is just a shell script, you can

    - create a copy of it, say, /usr/bin/firefox-hn
    - adjust the relevant line, adding the -profile argument
If you use an icon to run firefox (say, /usr/share/applications/firefox.desktop), you'll need to do copy/adjust line for the icon.


> Also profiles can be configured and used with CLI, no need for UI (old or new).

AFAIK, they can only be created at the command line, not configured. If you want to do things like change default settings or install extensions from the Firefox Add-On store, you can't really do that at the command line.

You can do that by mucking around in the user.js file and manually adding .xpi files to the extensions/ subfolder, but that's probably stretching the definition of "done at the command-line" since most people aren't creating Puppet modules to manage Firefox profiles.

Perhaps someone knows an easier way to do this, though.


Instead of needing to know scripting for a core feature, it would be nice if I could tell the program to ask me every time I open a new window which profile that window used. Right click would have an option like their containers "opening new profile window" .


Right-click on the Firefox icon and choose "Open Profile Manager".

Or add "-p" to the startup command to do the same thing without right-clicking:

    firefox -p


Better if they would allow some configuration like toggling js by domain. uBlock is great, but I would like first party support.


NoScript extension...


You don't need to switch. Just open whatever profile you want directly.

No need to go to about:profiles. Use a separate shortcut with a -profile option added.


Have you tried user.js?

You store browser preferences in it and firefox copies said preferences to prefs.js on startup (overwriting on conflict).


But there's no UI for that, nor is there a way to use it for any other profile data (that I know of).


Forget about UI, just use CLI

    ./firefox -CreateProfile "profile-name /home/user/.mozilla/firefox/profile-path/"

    ./firefox -profile "/home/user/.mozilla/firefox/profile-path/"
Create a separate icon for each profile and forget about:profiles interface.

Disclaimer: I don't use macOS, but I'm sure it's similar to Linux in that regard. You'll need to change paths, of course.


That's great for part of HN users, just not for most Firefox users. I guess that's they already had the old interface and are making it more user friendly with the new UI :-)


You don't need GUI to create profiles.

   ./firefox -CreateProfile "profile-name /home/user/.mozilla/firefox/profile-path/"


This is a good catch and does indeed work.

  -CreateProfile "profile-name"
also works and will use the default profile path.


Keep it mind, though, if you don't specify path, the profile directory name would be:

    random_string + '.' + "profile-name"
That could prove inconvenient for navigation.

If you want predictable, non-random directory names, you'll have to specify it.


Useful. This is not documented in the manfile or command help text, at least for the ESR release.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: