Need help setting homepage and blocking plugin notifications for akiosk extension - Mozilla

This is a discussion on Need help setting homepage and blocking plugin notifications for akiosk extension - Mozilla ; I have been developing a web kiosk extension for Firefox that suits our lab environment. After studying the developer documentation and other kiosk extensions I've been able to piece together a fairly solid kiosk environment that is secure while still ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Need help setting homepage and blocking plugin notifications for akiosk extension

  1. Need help setting homepage and blocking plugin notifications for akiosk extension

    I have been developing a web kiosk extension for Firefox that suits
    our lab environment. After studying the developer documentation and
    other kiosk extensions I've been able to piece together a fairly solid
    kiosk environment that is secure while still being an accessible web
    browser. However, a few things just don't seem to work as desired and
    I could use some help:

    1) Homepage and Welcome Page:
    I set "browser.startup.homepage" to our desired site via a JavaScript
    function, which shows in about:config but it does not apply until the
    browser has been restarted. Since the kiosk user profiles are cleaned
    out periodically the browser restores the default homepage.
    I would also like to either set the Welcome page that loads on the
    first run to something else, or disable it entirely. I have tried
    modifying "startup.homepage_welcome_url" from the JavaScript function,
    but it also does not apply right away.

    2) Disabling Plugin Notifications and Dialogs:
    When a missing plugin is detected (such as Flash) the yellow notice
    will pop down asking if the user would like to install the plugin.
    Currently kiosk users can step through the install dialogs, though
    they can not actually install anything. I would like to find a way to
    stop the notice from even appearing. Disabling the link to install
    from the plugin application itself location would also be nice.
    I have set "plugin.default_plugin_disabled" and
    "plugins.hide_infobar_for_missing_plugin" to various states through
    various means, but can not get anything to work quite right.
    - Like the homepage and welcome page, setting them through through a
    JavaScript changed them in about:config, but does not apply them.
    - Changing them to false and true, respectively, in about:config has
    exactly the effect I want, no notice or dialog, until the browser is
    reset (where it then opens a dialog for required plugins).

    I would prefer to set these preferences through through an extension
    rather than altering Firefox default settings. The kiosk extension is
    run on multiple machines and I would prefer to keep the setup
    simplified.
    I recall reading something about setting up an observer to monitor
    preference changes but I was unable to get anything working through
    the pieces I followed. If this is in fact what I'm looking for, maybe
    someone could explain a little more about how it works.

  2. Re: Need help setting homepage and blocking plugin notifications fora kiosk extension

    On Jan 14, 5:26*am, Neil wrote:
    > Lizard wrote:
    > >I would prefer to set these preferences through through an extension rather than altering Firefox default settings. The kiosk extension is run on multiple machines and I would prefer to keep the setup simplified.

    >
    > An extension can specify "default" preferences that override Firefox's
    > defaults.
    >
    > --
    > Warning: May contain traces of nuts.


    Ah, silly me missing that.
    You can indeed set default preferences by adding a .js file to /
    defaults/preferences/ in the root extension directory.

    I've done this, but "browser.startup.homepage" still does not take and
    now does not even apply after restarting the browser. In fact, it does
    not load any page initially after restarting the browser, and the home
    button still returns me to the original default. about:config does
    reflect my change again, however.
    If I manually change the site (say adding or removing a trailing /,
    thus going to the same page in this case) and restart the browser the
    change applies, but that's no good.

    I also do not have a fix for the plugin notifications if anyone has
    any ideas.

  3. Re: Need help setting homepage and blocking plugin notifications fora kiosk extension

    On Jan 15, 9:44*am, Neil wrote:
    > Lizard wrote:
    > >I've done this, but "browser.startup.homepage" still does not take and now does not even apply after restarting the browser. In fact, it does not load any page initially after restarting the browser, and the home button still returns me to the original default. about:config does reflect my changeagain, however.

    >
    > Ah, that's because browser.startup.homepage is actually what's called a
    > localised preference. The value in the defaults file needs to be that of
    > the chrome://extension/locale/extension.properties file, and it's the
    > .properties file that actually contains the desired value.
    >
    > --
    > Warning: May contain traces of nuts.


    I directed "browser.startup.homepage" in the defaults/properties/.js
    script to a localized chrome/locale/en-US/.properties file which
    contains a new reference for "browser.startup.homepage" (as well as
    "browser.startup.homepage_reset") to my desired homepage. I also
    declared the locale path in chrome.manifest.
    This properly set my homepage so that it now loads when the browser
    first starts up. However, the homepage button still goes back to the
    original Google homepage. This is still the case even after I restart
    the browser.

    Interestingly enough, the homepage button does work properly after a
    JavaScript function I have runs a certain way, though it returns not
    working after the browser is restarted. This function parses a page
    for documents (e.g. Word .doc) and alters the link to open the
    document with Google Docs in a new tab. After a document has been
    opened in such a way, the homepage button uses my set homepage.
    Attempting to download an unhandled file type or opening a new tab
    myself does not have this effect. It only seems to occurs if a
    document is opened that has been modified by the script.

    Any ideas?

+ Reply to Thread