Art

Teaching

Studies

Samfundsdebat

Diverse

Økologi


Pub


Internal Portal





edit



Printable View

Fullscreen kiosk/sign display with Firefox

So... you want a computer to boot, and automatically start Firefox, running completely fullscreen, with no title bar, navigation bar or anything. You just want it to display a particular web page - maybe for a sign, train times, or todays message/schedule. Here is how to do it:

1) Install Linux. I used Ubuntu, any distribution should be fine.

2) Install X, Firefox and the "autohide" extension from httpd://krickelkrackel.de/autohide

3) Stop X and the window manager from starting automatically by removing the symlink S13gdm in /etc/rc2.d and /etc/rc3.d

4) Just run

 xinit -exec firefox -fullscreen http://yourserver.org/showsign

From a command prompt

5) If you want it to run automatically on startup: Edit /etc/X11/Xwrapper.conf. Change

 allowed_users=console

to

 allowed_users=anybody

This will enable us to start X from a startup script.

6) Add the following to /etc/rc.local

 su nicolasp - -c xinit /home/nicolasp/sign

7) Create the following script in /home/nicolasp/sign and chmod to executable:

 #!/bin/sh

 xset s off
 xset -dpms

 exec firefox -fullscreen http://signs.imagio.dk/show/?host=`hostname` 

 # note `hostname` in backticks. This is not necessary, but useful
 # as it will give the output of the "hostname" program,
 # so your server can differentiate between many different signs and
 # give them each a different web page

Getting rid of the mouse cursor in Firefox:

in the web pages CSS stylesheet, include:

 body {
    cursor: url("./cursor.gif"), auto;
 }

Where the file cursor.gif is a one pixel transparent gif.

More examples/info

Run Firefox, specifying the full path, using a specific profile, in fullscreen, on the secondary display of a system with two graphics cards:

 /usr/bin/firefox -P profilename -fullscreen --display=:0.1

More tips:

Use a http-header-equiv or javascript in the web page to reload the page at certain intervals.

Use javascript in the web page to prevent horizontal and vertical scroll bars.

( If you want both belt and suspenders, or just to make sure other browsers visiting the page open a window filling the whole screen (although with title and navigation bars), use: onload="parent.resizeTo(screen.availWidth,screen.availHeight); moveTo(0,0);" onresize="parent.resizeTo (screen.availWidth,screen.availHeight)" )

Getting rid of the cursor in X11:

This will NOT get rid of it in Firefox or any other program - just in raw X.

Create a new directory /etc/X11/nologin. Inside /etc/X11/nologin, create a text file EmptyCursor with the following contents:

 #define Emptycursor_width 16
 #define Emptycursor_height 16

static unsigned char Emptycursor_bits[] = {

   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

This file defines an invisible mouse cursor to effectively hide the X11 default mouse cursor (yes, it's that difficult).

Page last modified on November 01, 2006, at 11:03 AM