racketlogger / ModernKiosk

Kiosk-like WebExtension for Firefox
GNU General Public License v3.0
23 stars 3 forks source link

Start Firefox in Modern Kiosk mode (Full Screen Mode - Issue #6) #15

Closed hecaxmmx closed 5 years ago

hecaxmmx commented 5 years ago

Start Firefox in Kiosk mode. Ability to start Firefox in Modern Kiosk mode, but no command line options (issue #6). Command line option can be supplied by startup programs in whichever OS or batch/bash scripts process.

To test: 1) Package the extension. 2) Run the Nightly or Developer Edition version of Firefox or 3) Follow steps in Test permission requests page 4) Install your extension 5) Go to ModernKiosk preferences 6) Change the option Start Firefox in Kiosk mode to "Enable" 7) Close and start Firefox againg. 8) Observe that Firefox start in Full Screen mode with the page pre-defined in url option.

Optional test (If don't want to package) 1) Make a new clone or download a zip (of the fork hecaxmmx:master) to test in a temporary installation 2) Change lines (extension/mk_bg.js) and save: fullscreen_enable: false, to "true" fullscreen_disable: true to "false" 2) Got to about:debugging and click in button "Load temporary add-on" 3) See that Firefox is launched in kiosk mode with page "example.org"

snatarajan85 commented 5 years ago

Interesting and awesome work. May I know when it will be available in market place? Its works great with temporary addon in debugging. I am not quite sure to generate xpi file or package this extension to install in my Firefox. Any suggestions?

snatarajan85 commented 5 years ago

I am able to successfully run this in my Firefox with your changes. Its look like multiple Firefox versions are running and its also launching kiosk mode with default URL configured in preference page. Is it possible to pass the URL from command line? Example: Firefox.exe www.google.com

hecaxmmx commented 5 years ago

Hi @snatarajan85

May I know when it will be available in market place?

I'm awating for @cpg to review the pull-request. He is the owner of this extension, and he is the only one who can update the extension in AMO.

Is it possible to pass the URL from command line?

  1. Right now you can trick this line: Line 100 of mk_bg.js: kiosk_url: "http://example.org/"

  2. Change to your app url then install web-ext.

  3. In batch or bash script (depend on your OS) goto /ModernKiosk/extension and run web-ext run

Regards

Amending this comment:

Also follow the "Optional test" above to start in fullscreen mode

snatarajan85 commented 5 years ago

Thanks for your response. Yes noticed that but my URL is not constant and it will change depends client.

hecaxmmx commented 5 years ago

Thanks for your response. Yes noticed that but my URL is not constant and it will change depends client.

Then add this code at the end of file mk_bg.js:

browser.windows.getAll().then((windowsArray) => { windowsArray.forEach((currentWindow) => { browser.windows.update(currentWindow.id, {state: "fullscreen"}); }); });

Next you only run in command line firefox https://www.google.com Maybe at this point, the major code of this extension is obsolete unless you want to use the context menu option. Another solution, maybe, is that you can install the following extensions:

Regards

PS: My purpose with this extension is to got all this in one place, even much better if we can add a keyboard for touch screens.

hecaxmmx commented 5 years ago

Maybe at this point, the major code of this extension is obsolete unless you want to use the context menu option.

I like Modern Kiosk rather than other extensions because the kiosk is opened in full screen in panel mode, i.e., users cannot navigate across sites or they cannot type another url.

cpg commented 5 years ago

Should we also add some bits of documentation for new users along with this change?

If nothing else, the tips above should be elevated for people who are more sophisticated than the average typical user and want to use this in some production environment.

hecaxmmx commented 5 years ago

Should we also add some bits of documentation for new users along with this change?

If nothing else, the tips above should be elevated for people who are more sophisticated than the average typical user and want to use this in some production environment.

You're right, Carlos.

Could you open the Wiki space for this extension? There we can write down all sort of documentation to help others.

Regards.

cpg commented 5 years ago

Good idea. First page created. I assume you can just create some PR to get things in it? Feel free.

nbroutin34 commented 5 years ago

Hello, where can I find the zip or xpi file to install it please ?

hecaxmmx commented 5 years ago

Hi @nbroutin34 Sorry for the delay to answer you You can prepare your own package of this extension if you download a ZIP file:

1) Goto the main page of this repository and you will find the button "Clone or download", there you can download a ZIP file. 2) Uncompress the file and goto (in my case) Downloads/ModernKiosk-master/extension/ 3) Open with a simple text editor the file "manifest.json" 4) Add this code at the bottom of file and save: Add a comma in the last close curly brace, e.g. }, And paste the code below: "browser_specific_settings": { "gecko": { "id": "addon@example.com", "strict_min_version": "42.0" } } 5) Install web-ext following this guide 6) Run web-ext build in the same folder above, this will create a folder web-ext-artifacts with a zip file inside. 7) Or you can follow this guide for the creation of a package too. 8) In Firefox Nightly goto "about:config" and search for "xpinstall.signatures.required" and change value to "false". NOTE: In some version of Firefox ESR you can override this configuration, see here. In my case Linux Debian 9 with Firefox 60.7.0esr (64-bit) Firefox Quantum extended support release, I can change this preference 9) Goto "about:addons" or Ctrl-Shift-A and search for a "Gear" button, and the option "Install Add-on From File..."

And that's it, enjoy the extension whit the new changes!

Regards PS: You can ask personally to @cpg (Carlos) to update version and send to official Firefox Add-ons site. He is the only one can perform this task.

TODO: This remind me that this kind of info can be placed in the Wiki.

cpg commented 5 years ago

@hecaxmmx .. the wiki is enabled, so you (or anyone else) can start adding content to it

cpg commented 5 years ago

added to the wiki

hecaxmmx commented 5 years ago

Great job @cpg !