Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

Create multi profile: different behaviour between linux and windows

  • 12 Antworten
  • 1 hat dieses Problem
  • 23 Aufrufe
  • Letzte Antwort von cor-el

more options

Hi, I come from linux world. However, I'm writing a script in order to automatize installation process on windows. In the script, I create a new profile for firefox providing an existing folder with the extensions, plugin, bookmark, etc.. I know that I can use sync, but I cannot create a common email address for 100 PC since after installation I have to disconnect all of them.

Linux rm -rf /home/$USER/.mozilla/firefox/*.* firefox -CreateProfile "myUser /home/$USER/.mozilla/firefox/m4v6pi7q.myUser" cp -r ./m4v6pi7q.myUser /home/$USER/.mozilla/firefox

Windows powershell Remove-Item $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\* -recurse if($64Bit) { & 'C:\Program Files\Mozilla Firefox\firefox.exe' -CreateProfile "myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser" } else { & 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' -CreateProfile "myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser" } xcopy .\m4v6pi7q.myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser /s /e /h /y /i

On linux the previous command removes all the available profiles and create new profile called myUser by using folder m4v6pi7q.myUser. When I start firefox the myUser profile is the only available and all work well. On window the previous command removes all profile folders, but not the profiles in profile manager. So when I start firefox the default profile is the one selected. I have to start firefox with -p option and to manually select the right profile. Why am I encountering such different behaviour? Thank you

Hi, I come from linux world. However, I'm writing a script in order to automatize installation process on windows. In the script, I create a new profile for firefox providing an existing folder with the extensions, plugin, bookmark, etc.. I know that I can use sync, but I cannot create a common email address for 100 PC since after installation I have to disconnect all of them. Linux rm -rf /home/$USER/.mozilla/firefox/*.* firefox -CreateProfile "myUser /home/$USER/.mozilla/firefox/m4v6pi7q.myUser" cp -r ./m4v6pi7q.myUser /home/$USER/.mozilla/firefox Windows powershell Remove-Item $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\* -recurse if($64Bit) { & 'C:\Program Files\Mozilla Firefox\firefox.exe' -CreateProfile "myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser" } else { & 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' -CreateProfile "myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser" } xcopy .\m4v6pi7q.myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser /s /e /h /y /i On linux the previous command removes all the available profiles and create new profile called myUser by using folder m4v6pi7q.myUser. When I start firefox the myUser profile is the only available and all work well. On window the previous command removes all profile folders, but not the profiles in profile manager. So when I start firefox the default profile is the one selected. I have to start firefox with -p option and to manually select the right profile. Why am I encountering such different behaviour? Thank you

Ausgewählte Lösung

Alle Antworten (12)

more options

Hello,

You should be able to start Firefox with a specific profile with firefox -p PROFILE_NAME so you don't have to manually select it.

Also, it's possible that in Windows profiles are stored in AppData\Roaming\Mozilla\Firefox\Profiles this might explain why the profiles still exist in Profile Manager.

more options

Hi, thank you for the fast reply. Yes I know that I can start firefox with firefox -p PROFILE_NAME however the default profile remain the profile called default. That is if I start firefox without -p PROFILE_NAME, it starts from other profile. I read here https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data?redirectlocale=en-US&redirectslug=Profiles and I also tried to delete all the content of AppData\Roaming\Mozilla\Firefox\Profiles and AppData\Local\Mozilla\Firefox\Profiles then to create new profile C:\Program Files\Mozilla Firefox\firefox.exe' -CreateProfile "myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser" and to copy data xcopy .\m4v6pi7q.myUser $env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\m4v6pi7q.myUser /s /e /h /y /i The folder AppData\Roaming\Mozilla\Firefox\Profiles is empty. I still have two profiles: default and myUser. Any suggestions?

more options

Ausgewählte Lösung

more options

Yes, you are right. I have to remove all the profiles from Roaming folder AppData\Roaming\Mozilla\Firefox\Profiles and the profiles.ini file AppData\Roaming\Mozilla\Firefox\Profiles\profiles.ini and now it works well as in Linux. Thank you

more options

Hi, I have a one more question related to multi profile. Can you tell me why whenever I copy a folder of a profile in another system all the default search engines are restored even if the profile folder contains only some search engines? Thank you

more options

The default search engines aren't stored in the Profile folder any longer. They're in the omni.ja file in the Firefox program files folder, and they're used from there. The /searchplugins/ folder in the Profile folder is now used for add-on search plugins only. Been that way since Firefox 34 when the new Search Bar was added. And with Desktop 34.0.5 Mozilla changed the default search engine from Google globally to using different search engines in different geographic regions. Yahoo in the US; Yandex in central Asia, and few others were added for other localizations in subsequent releases as new agreements were negotiated. Big advantage to using the omni.ja file is that search engines can be added / changed every 6 weeks (part of the version update) if need be, and every Profile will have the same default search engines.

One downside to this new scheme that ran into, is that the default engines override those in the /searchplugins/ folder if the 'add-on' has the same 'name' as one of the defaults. I happened to have a Google search engine that I edited for doing a custom search many years ago, and forgot it was edited (but it had the older Google icon so I 'knew' it was custom). And I wondered why that search engine was 'lost' when Firefox 34 was installed. After a few weeks I fixed it by editing the 'name' to Google- and voila it reappeared in the search engines list. I suspect Mozilla did that to keep the default search engines intact to 'protect' their interests i.e., their search commissions flowing for their defaults.

more options

the-edmeister said

I suspect Mozilla did that to keep the default search engines intact to 'protect' their interests i.e., their search commissions flowing for their defaults.

Thank you very much for your detailed answer. I was imagining the same thing about the Mozilla policy. However, if this choice allows to remain free from other bad sources of money, I can say that I agree.

more options

You can see the default search engine via this chrome URI that you can open via the location/address bar like a web page.

  • chrome://browser/locale/searchplugins/
  • resource://search-plugins/

Note that Firefox stores the information about installed search engines in the search.json file and search-metadata.json files in the Firefox profile folder.

You can use this button to go to the current Firefox profile folder:

more options

cor-el said

You can see the default search engine via this chrome URI that you can open via the location/address bar like a web page.
  • chrome://browser/locale/searchplugins/
  • resource://search-plugins/
Note that Firefox stores the information about installed search engines in the search.json file and search-metadata.json files in the Firefox profile folder. You can use this button to go to the current Firefox profile folder:

So if the search engines are stored in search.json file and search-metadata.json files in the Firefox profile folder, why if I modified them when I copy the profile folder into a new installation of Firefox, the search engines are the default ones instead of customized ones?

more options

Only information about the installed search engines is stored in search.json. User installed search engines are stored in the searchplugins folder in the profile folder and you wil stil need these xml files.

more options

cor-el said

Only information about the installed search engines is stored in search.json. User installed search engines are stored in the searchplugins folder in the profile folder and you wil stil need these xml files.

Thank you for the answer. You do not answer to my question or I do not understand. Why are default search engines restored when a profile folder with a subset of default search engines is copied to a new installation?

more options

If there are custom search engines installed in the searchplugins folder in the profile folder then maybe best is to exclude the search.json file to force Firefox to rebuild the search engine database. Keywords added to search engines might be stored in search-metadata.json, so you can check the content of this file when present.