[Mozilla Enterprise] Policies (w/GPO) feedback and questions

Stephen Dowdy sdowdy at ucar.edu
Tue Jul 3 20:04:24 UTC 2018


On 07/03/2018 01:30 PM, Daniel Frey wrote:
> Yes, I found out firefox is not smart enough to create a profile when
> the directory does not exist. I'm trying to address that with a folder
> preference and having mixed results.

FWIW, on Linux, i do:

     firefox -CreateProfile "${ff_prof_name}" -new-instance -no-remote

to create a new profile programmatically.  Of course, this defaults to creating it in the HOME directory hierarchy, but you could subsequently move that and symlink to the new location, or modify profile.ini with non-relative pathing.

$ firefox -CreateProfile TiddlyWinks -no-remote -new-instance
Success: created profile 'TiddlyWinks' at '/home/sdowdy/.mozilla/firefox/wy8ueze2.TiddlyWinks/prefs.js'
$ awk -v 'RS=\n\n' '/Name=TiddlyWinks/'  ~/.mozilla/firefox/profiles.ini
[Profile37]
Name=TiddlyWinks
IsRelative=1
Path=wy8ueze2.TiddlyWinks

$ ls -l /home/sdowdy/.mozilla/firefox/wy8ueze2.TiddlyWinks/
total 4
-rw------- 1 sdowdy rap  0 Jul  3 13:45 prefs.js
-rwx------ 1 sdowdy rap 29 Jul  3 13:45 times.json*

There's really not much to a profile directory anymore, it appears.

CreateProfile takes an optional directory argument (embedded in the singular argument with a space-separator):

$ firefox -CreateProfile "ToddlyWinks /var/tmp/sdowdy/ToddlyWinks"   -no-remote -new-instance
Success: created profile 'ToddlyWinks /var/tmp/sdowdy/ToddlyWinks' at '/var/tmp/sdowdy/ToddlyWinks/prefs.js'
$ awk -v 'RS=\n\n' '/Name=ToddlyWinks/'  ~/.mozilla/firefox/profiles.ini
[Profile38]
Name=ToddlyWinks
IsRelative=0
Path=/var/tmp/sdowdy/ToddlyWinks

and that automatically sets the non-relative flag ;)

Now.... Can you count on the Moz Devs to honor the (not well-documented) Profile management features of the command line?  i wouldn't bet on it.


There also appears to be a '-migration' flag for the command line but i don't know what that does.
     firefox -P ToddlyWinks -search "firefox migration command-line" -no-remote -new-instance
-->  https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options
     -migration  Start with Import Wizard.


Caveats: if the profile name and/or directory already exist, '-CreateProfile' seems to just say "yeah, i succeeded!"
Also, there's no "-DeleteProfile" matching argument :-/

--stephen


-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/




More information about the Enterprise mailing list