“Closeable Kiosk” with firefox user styles

Recently I got request to create a “closeable browser-based kiosk”– basically a browser in full screen mode, can’t be minimized/resized/moved or returned to non-full screen mode, no browser file menus, no address bar/navigation bar so user have to be stay on the same page, and can’t go to other urls. However user should be able to close it using mouse. This is to be deployed on some real kiosk booths like the ones often seen in a museum. There is no keyboard on the kiosk so short cut key combinations like alt-F4 won’t work.

Browsers like Chrome or Internet Explorer already have the built-in kiosk feature. for IE it’s the -k option; for Chrome there is the –kiosk option. if you start the browser with these options you will see the browser in kiosk mode. for firefox, there is the r-kiosk addon. Problem is that there is no way to close the browser with just a mouse once you are in kiosk mode.

One simple solution is to use firefox ‘s userscripts feature to create my own closeable kiosk mode.

the steps are:

(1) from firefox menu. option “tools”–>”options”–>”privacy”–>history, for “firefox will” dripdown, choose “use custom settings for history”, then choose the option (checkbox) “clear history when forefox closes”, then click OK button.

(2) install the “stylish” firefox extension from https://addons.mozilla.org/en-US/firefox/addon/stylish/

(3) open stylish add on, click “write new style”, an editor will open. enter the following code in the editor, then save the style and enable it.

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@media not all and (-moz-windows-compositor){

.statuspanel-label {display:none !important;}
#nav-bar {display:none !important;}
#navigator-toolbox {display:none !important;}
#urlbar-container, #openLocation {display:none !important;}
#minimize-button,#restore-button,#close-button {display:none !important;}

#titlebar-max, #titlebar-min {display:none !important;}
}

now if you start firefox you will see a “closeable kiosk”. for example, “firefox https//accounts.google.com/” you will see the following “kiosk” with only the “X” close window icon on the title bar:

There are other ways to do this as well. For example, we can write some UserScripts in firefox or Chrome to inject some “close window” button onto al the web pages. so that user can always close the browser with mouse even in the native browser kiosk mode. Will give an example how that works later.

About: mmpower

Software Architect & Soccer Fan 黑超白袜 = IT 民工 + 摇滚大叔


One thought on ““Closeable Kiosk” with firefox user styles”

Leave a Reply

Your email address will not be published. Required fields are marked *