WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Firefox in kiosk mode  (Read 10645 times)

Offline mitoim

  • Newbie
  • *
  • Posts: 9
Firefox in kiosk mode
« on: March 21, 2011, 12:27:18 AM »
Hi,

Does anyone know if it is possible to run Firefox in kiosk mode in TC?
And if it is, how?

Thanks

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: Firefox in kiosk mode
« Reply #1 on: March 21, 2011, 02:36:39 AM »
yes it is, i believe there are posts in the forum about same or similar topics. but in short, i would do it the following way:

1. evilwm as wm started on boot;
2. load firefox extension on boot, and
- either make a start script in order to execute firefox after x has been started.
- or put "firefox &" (without quotes) at the end of your .xsession file.

that should do it

Offline mitoim

  • Newbie
  • *
  • Posts: 9
Re: Firefox in kiosk mode
« Reply #2 on: March 21, 2011, 05:25:59 AM »
Hi Alu,

I was able to install real kiosk addon.
I downloaded the .xip file an loaded it in firefox as an extension.
I have only one question : under X, can I run only firefox and not the whole window manager?

Thanks

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: Firefox in kiosk mode
« Reply #3 on: March 21, 2011, 07:12:19 AM »
probably not since a wm is needed in order to frame the apps running in x, i.e. in your case firefox. but you can use an almost not visible wm such as evilwm which would give the impression that firefox is running without wm.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Firefox in kiosk mode
« Reply #4 on: March 21, 2011, 08:07:57 AM »
Works for me sans wm with opera.tcz in kioskmode   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Firefox in kiosk mode
« Reply #5 on: March 21, 2011, 08:54:14 AM »
probably not since a wm is needed in order to frame the apps running in x, i.e. in your case firefox. but you can use an almost not visible wm such as evilwm which would give the impression that firefox is running without wm.
Yes, you can run an X application without a window manager. Here is a link to a forum topic where I have an explanation of how to do this with an older version of firefox. http://forum.tinycorelinux.net/index.php?topic=2954.msg15182#msg15182
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Firefox in kiosk mode
« Reply #6 on: March 21, 2011, 08:59:54 PM »
Here is a basic idea of what I would do.

Set up Grub so you have 2 logins.

The first login starts by default, and is used for the kiosk. Have it log in with a name other than tc. Remove everything you don't want the users to access from the wbar. Set up a script to remove the menu, or everything from the menu you don't want users to access. Have this run at start up, using /opt/bootlocal.sh. You may have Firefox as well as other internet browsers, so users have a choice.

Set up the second login for administration. Log in as tc. Set it up so it requires a password to log in. Another option is to boot from a usb drive for administration.
Many people see what is. Some people see what can be, and make a difference.

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
Re: Firefox in kiosk mode
« Reply #7 on: July 29, 2012, 12:54:44 AM »
Another way to make a KIOSK with nearly any distro,
though TINY CORE is rather ideal.

First, lets agree a kiosk has to:

a) boot to an opening screen in such a way as to prevent a user from halting/altering that process,

then

b) if a user tries to exit that screen, prevent them from accessing drives or configuration,
either of the kiosk menu system (aka browser), or the actual system files (aka Linux/Tiny Core/Windows Manager etc.)

c) Optionally, in some cases, you might want users to be able to access
specific applications; like a kiosk that provides a word processor, spreadsheets etc.
in addition to the standard fare of going online and serving up web pages. Or a kiosk
might just be serving local content, such as a kiosk at a harbor that talks
about the location and various activities, events and sea life etc.

To accomplish the first objective - the boot - is rather simple::

I have a shell script that:

a) checks for the folder /home/tc/.X.d and creates it if it doesn't exist

b) checks for the file /home/tc/.X.d/kiosk.sh and copies a script to that file name if it doesn't exist

c) and if it has to do those 2 steps, it then exits

d) and the Tiny Core boot process then launches /home/tc/.X.d/kiosk.sh

e) and since those steps do not have to be done, the /home/tc/.X.d/kiosk.sh script then does a tce-load -i firefox, followed by firefox awebpage.htm (whatever you want the html page to be called),

f) and the script then checks the PS command (loops) and if firefox is shut down, it reboots right away.

Of course some fast users could do a quickie top, find the script and stop it - maybe - before it reboots,
but using any sort of close firefox keystroke triggers a pretty darn fast reboot.

To get firefox to do a full screen is rather easy using javascript and the window.Innerheight and width commands, along with the resize and to ensure the browser will allow that, a simple modification of the user.js file and then copying that to the /home/tc/.mozilla/12345etc./user.js file, along with creating a firefox profile.ini before loading firefox pretty much guarantees the browser's configuration will be the same at each boot and you can thereby prevent users from changing the configuration from within firefox.

It takes a bit of arm wrestling to go through all the firefox configuration items using about:config in the address bar, but once you have it set the way you want it you can pretty much lock users out of being able to change your settings and with your kiosk.sh script running background, pretty much prevent users from breaking out to any windows manager of any flavor.

Perfect? No, but pretty hard to get around for the average or even seasoned user unless they completely break out of the windows manager altogether...and someone like that is probably likely to just bring a CD or USB Flash Drive with their own Tiny Core on it and now you have a different set of issues altogether.

To get applications to run for them - i.e. AbiWord, you can use the NETCAT command (NC) and a browser page that uses a form posted to local system: I wrote an entire menu-driven system with NC and Firefox and easily call scripts and modify files on the hard drive from web page - basically a mini-server at the local level - pretty easy to do.

I did not list code here as I am not sure if we are supposed to do that, but to summarize:

a) use the .X.d folder for a start up script and get firefox and your web/home page going

b) set firefox parameters with user.js

c) use javascript to get your full screen

d) make sure your script checks the output of the PS command so if firefox terminates you reboot

...simple...set one of these up tonight as a matter of fact for a Veterans Hall location.

~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.