WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: launching firefox in kiosk mode  (Read 3340 times)

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
launching firefox in kiosk mode
« on: August 06, 2020, 04:22:07 PM »
Hi,

I am launching firefox like this from `~/.X.d/firefox`:

Code: [Select]
firefox -private-window http://localhost:3002/static/ -setDefaultBrowser
  • Using -private-window as that uses less memory.
  • -setDefaultBrowser suppresses the confirmation to select the browser as the default browser.
  • But since it thinks firefox is running for the first time, it launches "privacy policy" link in second tab.
  • Shows some flying prompt for extensions won't be available in private mode on top-right & "refresh nightly" option at bottom

Can't use --kiosk option as that's available from v71 and repo's firefox.tcz has v68.5.0esr

Any ideas how to make it hide every UI element and just render webpage in full screen?

Perhaps using a custom profile? Can't figure out what options are available for configuration. I tried method highlighted in the TC book, but this nightly version seems locked to a particular profile.
Perhaps using an extension?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: launching firefox in kiosk mode
« Reply #1 on: August 06, 2020, 04:30:26 PM »
Hi ashfame
...
  • But since it thinks firefox is running for the first time, it launches "privacy policy" link in second tab.
...
So if you close Firefox and restart it, does it start normally? If so, Firefox probably created some file(s) to tell it that it has been
run before. Find the file(s) and add it to your backup or maybe your initrd.

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: launching firefox in kiosk mode
« Reply #2 on: August 06, 2020, 04:47:18 PM »
Hi Rich, good idea. I will try to figure that out. But this would only deal with the new tab & the prompts.

Still need a way to go full screen with no UI elements of browser. Any idea about that?

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: launching firefox in kiosk mode
« Reply #3 on: August 12, 2020, 04:36:40 PM »
Hi Juanito,

Do you think its possible for you to make Firefox v71 available as that comes with kiosk mode in built?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: launching firefox in kiosk mode
« Reply #4 on: August 13, 2020, 01:22:39 AM »
Hmm - as it took 71.5 hours to compile I'm not sure when I'll get to it.

If you'd like to have a go yourself: http://tinycorelinux.net/11.x/armv7/tcz/src/firefox/compile_firefox

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: launching firefox in kiosk mode
« Reply #5 on: August 13, 2020, 04:50:22 AM »
Yeah, I am down to compile. Very little experience with compilation and one power cut is all that will ruin it for me though  :'(
This would have to be done on the same architecture right?

So, I should use Raspberry Pi 4 since that has the highest CPU core clock, but will that produce ARMv8 or ARMv7?

Also, can we use arm based cloud computing power to compile it? which will most likely be arm64, will that work?
Or how about compiling in a docker that has the cross-compile toolchain?




Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: launching firefox in kiosk mode
« Reply #6 on: August 13, 2020, 05:43:00 AM »
You will need to compile on an external hd or usb stick anyway, so it doesn't matter if there's a blackout, you could most likely continue from where you left off.

If you use piCore and an RPi4, it will compile for armv7

We are just introducing aarch64 with piCore64-12.x, so there's no point compiling for that yet.

I've found that it is always better to compile natively.

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: launching firefox in kiosk mode
« Reply #7 on: August 13, 2020, 07:25:00 PM »
I did a crazy thing and it worked.

Pulled Chromium out of Raspbian OS & all the libraries it complained to be missing when I tried to launch it, one by one. And my kiosk mode is now functional.

Currently have the hacked up extension here - https://woodpckr.com/chromium.tcz with 3 dependencies `gtk gnutls libavahi` in chromium.tcz.dep file & it works nicely.

Pretty sure, many of the shared libraries that I am manually providing, can be easily replaced by setting the right extension as the dependency but it results in less memory consumption, so I am happy with that compromise.