launch custom profile from command line
Hi,
If I launch this, all's fine:
firefox.exe http://myurl
I can view the site at http://myurl.
However, I want to launch firefox with a specific profile, so I tried this:
firefox.exe -profile "C:\firefox\profile" http://myurl
I know that the profile's directory is loaded and written to because I created that dir with ONLY chrome/userchrome.css, and after launching firefox I can see a whole bunch of new files in there (eg. json files, sqlite files, etc.)
I can also see that it is also properly applying the settings in userchrome.css after I enabled toolkit.legacyUserProfileCustomizations.stylesheets.
However, http://myurl is not being opened at all. The culprit seems to be my userchrome.css which contains:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
- openLocation, #urlbar-container, #CustomizeToolbarWindow, #toolbar-context-menu, #menubar-items {
display:none!important;
}
My intention is to open a URL and disable all other bells and whistles in the browser except the window and forward/back buttons (ie. I do not want kiosk mode).
How can I do that?
[EDIT]
It seems that #urlbar-container is the problem. If I set it to display:none!important, firefox will not open the URL I provide on the command line. Why? So, how can I tell firefox to open a URL but not allow the user to navigate elsewhere by typing it in the "urlbar"?
[EDIT 2]
This seems to do the trick:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
- openLocation, #CustomizeToolbarWindow, #toolbar-context-menu,
- search-container, #personal-bookmarks, #menubar-items {
display:none!important;
}
- urlbar-container {
visibility:hidden;
}
However, I'd like to know if there are caveats.
BTW if Mozilla's support for userchrome.css will ever be dropped in the future what is a better way of doing the above? I certainly can't use kiosk mode and -app (app mode) is unavailable and will probably never will be.
Izmjenjeno