Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How to disable some specific buttons and one preference in Options with lockPref

442 views
Skip to first unread message
Message has been deleted

You can call me "Sparky". No one ever has but you could start.

unread,
Dec 19, 2011, 8:24:21 PM12/19/11
to
On Dec 19, 10:56 am, "Thee Chicago Wolf [MVP]" <.@.> wrote:
> Hi all,
>
> I'm wondering if anyone out there could help me with a couple
> settings? I'm doing more kiosk-mode stuff and I was wondering how to
> lock/disable down a few buttons. I've long since tried to figure out
> how to hide them but have always come up empty. There are tons of
> buttons in Firefox Options that can be disabled/locked using lockPref.
> For example, I disable/lock three buttons related to Home Page (Use
> Current Page, Use Bookmark, Restore to Default) with these:
>
> lockPref("pref.browser.homepage.disable_button.bookmark_page", true);
> lockPref("pref.browser.homepage.disable_button.current_page", true);
> lockPref("pref.browser.homepage.disable_button.restore_default",
> true);
>
> Some I am able to discover and some just don't seem to have (pref....)
> entries to lock down. At least, I cannot find them using my methods.
>
> Can some kind soul tell me the pref to disable the following buttons?
>
> Options > Content > Fonts & Colors > Advanced
> Options > Content > Fonts & Colors > Colors
> Options > Content > Languages > Choose
> Options > Content > Languages > Choose > Select a Language to Add
> Options > Security > Exceptions
> Options > Security > Exceptions > Allow
> Options > Security > Exceptions > Remove Site
> Options > Security > Exceptions >  Remove All Sites
> Options > Advanced > Network tab > Connection > Settings
> Options > Advanced > Network tab > Offline Storage > Clean Now
> Options > Advanced > Network tab > Offline Storage > Exceptions
> Options > Advanced > Encryption tab > Validation
>
> Can some kind soul tell me the pref to disable the following setting?
>
> Options > Security > Passwords >  Use a Master Password
>
> Lastly, I tried disabling about:config with the below setting (found
> it on a Google search) in userChrome.css but it didn't work. Is there
> one that will?
>
> window#config * { display: none; }
>
> Many thanks for any assistance.
>
> - Thee Chicago Wolf [MVP]

I was just looking for a similar answer and happened upon your post.

Unfortunately I can't help w/ everything but I can tell you why
window#config*{display:none;} isn't working for you.
It is because that line doesn't go in userChrome.css, it goes in
userContent.css. (I do have that working).

I had a very nice kiosk setup all working for Firefox 3.6 but they
have changed everything.
I was able to disable downloads by removing some files from omni.jar
and eliminating menu w/ userChrome.css settings.

The problem I am having now is removing the drop down firefox menu in
firefox 8. Or at least removing the "preferences" part. Also I can't
seem to modify omni.jar this time. I suppose they changed something
to discourage modification..maybe for security reasons.

I am happy to share my userChrome and userContent files, or even my
whole .mozilla file from before if you want to look through it. (It is
for Linux but I think the settings should be similar or the same for
windows). It is different for firefox8 though so it seems like I have
to mostly start over which I am not happy about.








You can call me "Sparky". No one ever has but you could start.

unread,
Dec 19, 2011, 8:26:19 PM12/19/11
to
Message has been deleted

You can call me "Sparky". No one ever has but you could start.

unread,
Dec 20, 2011, 8:54:34 PM12/20/11
to
> Thanks for the tip on where the window#config line goes. Apparently so
> few people must be kiosking like us that this information doesn't
> quite get relayed correctly on the web.
>
> For the most part, I have a good amount of prefs locked down to keep
> even the most tenacious person from screwing up my Firefox installs
> but thanks for the offer. Realistically, removing access to Options
> menu works best but then it makes it bothersome to check if a pref
> lock-out works or not.
>
> Have you used the DOM Inspector to see if it might tell you how to
> figure out that drop-down menu issue? I tried to figure it out once
> but was unsuccessful.
>
> I had to re-do my config file from scratch the other day because
> something changed between Fx9 Beta 6 and 9 final. When I launched Fx 9
> final, it complained about an error in some line and was beyond vague.
> It took me around 5 hours of straight work to re-do it but in the
> process I discovered some settings I was still using were gone.
>
> - Thee Chicago Wolf [MVP]

I hadn't seen DOM inspector. Thanks, nice find.

I did finish modifications to my satisfaction this morning.
On earlier kiosk (which really was an internet kiosk) I forced full
screen and eliminated the panel on bottom so there was no way to
escape the browser which pulled up automatically upon system start.
This is actually not for a kiosk so full screen is not forced etc.

What I am doing is using DansGuardian with /squid proxy to prevent
certain sites from being accessed. So I needed to prevent access to
"preferences" (Called "options" in the Windows version but exactly the
same). In order to do this I eliminated the menu including the drop
down menu in tab bar. But before I did that, I set everything up the
way I wanted in normal preference (options) menu. I didn't have to use
about:config. although you could use that also. My changes included
network setup (through proxy), privacy options, file "save to" options
etc. I got rid of the drop down menu by un-checking "always show tab
bar" in "tabs" . There are no tabs, so this is not ideal, but its ok
for what I am doing. When everything was set up the way I wanted I
then copied userChrome.css and userContent.css files to the
user_profile\chrome (13i61gey.default ..the name is different for each
user). Placing these files eliminated the menu and eliminated access
to about:config when firefox restarted. Finally, I set the file
permissions for firefox user files to prevent non-root users from
being able to alter them. I don't think there is any way for ordinary
users to modify the settings now... at least I can't think of one.
This was on Linux but it should work exactly the same Windows.
Here are userChrome and userContent files I used if you are curious.
Best of luck.
_________
userChrome.css
*************************
/*
* Edit this file and copy it as userChrome.css into your
* profile-directory/chrome/
*/

/*
* This file can be used to customize the look of Mozilla's user
interface
* You should consider using !important on rules which you want to
* override default settings.
*/

/*
* Do not remove the @namespace line -- it's required for correct
functioning
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul"); /* set default namespace to XUL */


/*
* Some possible accessibility enhancements:
*/
/*
* Make all the default font sizes 20 pt:
*
* * {
* font-size: 20pt !important
* }
*/
/*
* Make menu items in particular 15 pt instead of the default size:
*
* menupopup > * {
* font-size: 15pt !important
* }
*/
/*
* Give the Location (URL) Bar a fixed-width font
*
* #urlbar {
* font-family: monospace !important;
* }
*/

/*
* For more examples see http://www.mozilla.org/unix/customizing.html
*/
#file-menu, #edit-menu, #view-menu, #history-menu, #bookmarksMenu,
#tools-menu, #helpMenu {display: none !important;}
#urlbar > #urlbar-icons > #star-button {display: none !important}
#status-bar, #progress-bar {display: none !important}
________
userContent.css
*********
*
* Edit this file and copy it as userContent.css into your
* profile-directory/chrome/
*/

/*
* This file can be used to apply a style to all web pages you view
* Rules without !important are overruled by author rules if the
* author sets any. Rules with !important overrule author rules.
*/

/*
* example: turn off "blink" element blinking
*
* blink { text-decoration: none ! important; }
*
*/

/*
* example: give all tables a 2px border
*
* table { border: 2px solid; }
*/

/*
* example: turn off "marquee" element
*
* marquee { -moz-binding: none; }
*
*/

/*
* For more examples see http://www.mozilla.org/unix/customizing.html
*/

window#config * { display: none ! important; }
__________________________

0 new messages