Search code examples
firefoxx11centos5kiosk

How to run Firefox full screen in minimalist X environment


I wish to set up what is usually called a Kiosk, running Firefox locked down to our own specific home page (and links from there). The base operating system is CentOs 5 (i.e. just like RedHat Enterprise 5).

Ideally I want Firefox to start full screen (and I have installed the full-fullscreen addon to help with this), and to be locked as such (i.e. F11 does not work).

I need to be able to install this system using one or more rpm files.

I have tested my fullscreen Firefox setup rpm under Gnome, and it works fine - my Gnome desktop is 1024x768, and the selected home page comes up exactly filling the screen - looks great.

However, I do not want to bother with a desktop environment (like Gnome or KDE), just run Firefox as the sole X client program, with a fixed screen size of 1024x768.

I have built rpms to install X, configure it to run at 1024x768, and fire up X automatically from an autologin using shell scripts.

My main autologon script contains this:

startx ~/client/xClient.sh  -- :1 &

xClient.sh contains this:

while [ true ]
do
    firefox
done

My problem is that Firefox does not come up full screen under this setup. The firefox window is smaller than the screen, and the top left corner is off the screen - this means the web page gets scrollbars, the top and left of the page does not show, and there is a black area along the bottom and right.

Does anyone know the reason for this behaviour?

What solutions can you suggest?

I suppose, if necessary, I could install Gnome on the machine, and then try to lock it down - but it seems silly to add something as complex as Gnome just to get the window to appear the right size, and in the right place! Plus there is the extra task of trying to lock Gnome down so the users can't do anything else with the machine.

If you think this question should not be on Stack Overflow, please tell me where it should go. (I think writing rpm and shell scripts are programming, but maybe they don't count? If not, sorry!)


Solution

  • We have a similar setup to yours and after a little testing decided to use a tiling window manager instead of just running chrome or firefox in X. A tiling window manager will give you fullscreen regardless of application and many will not have the windows borders/decorations, also great for kiosks.

    Xmonad works really well for touch screens; matchbox works well too depending on your use case. Awesome and ratpoison are other good alternatives. You will probably have better luck picking a very minimalist window manager than running directly on X.

    http://www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux-and-x11-2011-edition/

    Xmonad has tons of hotkeys which would have to be disabled, so while perfect for touchscreens, may not be suitable for kiosks with keyboards. It does have great configuration documentation and a vibrant community -- but is not a drop-kick solution with keyboard equipped kiosks.