Porteus Kiosk - A specific locked Linux for public access

Porteus Kiosk - A specific locked Linux for public access

Posted By: pmietlicki

Published to Linux on Jun 17, 2015

For a specific project implementing "kiosk" publicly available computers, they asked me to find and install an operating system with only a web browser that should connect to a webpage in order to display different links.

Goal : have a basic and locked linux system made for touchscreens. The main configuration should be, if possible, centralized.

I've made some searches and I finally found 2 linux distribution for this kind of usage :

- Porteus Kiosk
- Justbrowsing (havent't tried it yet, would worth a try though)

They exist some others out there but not relevant, not maintained or outdated.

Porteus Kiosk

Porteus Kiosk is a specific Linux OS for kiosk usage. You can centralize the configuration and install packages thanks to xzm packages. It is based on slackware.

You can download several images (UEFI support, normal BIOS or custom build). The custom build is just to show what specific configuration could be done and that's more a "proof of concept" in order to contact the team to make custom builds for you, this service is not free.

The main advantage with this distribution is that you can "centralize" a configuration file. So, each time the computer is launched, it will read and launch the centralize configuration file and change its settings. You can change the idle time, the type of connection, the type of browser (firefox or chrome), the homepage, etc.

For both browsers (firefox or chrome), you can change the default homepage

A chrome example :

whitelist=nc gouv.fr noumea.nc

A firefox example :

whitelist=nc noumea.nc 

Please note that you can directly disable address bar or navigation bar inside firefox with the central configuraiton for porteus kiosk

If you want to enable SSH, you will have to set the root password and add an additional component :

additional_components=uefi.zip 08-ssh.xzm

Customizing the distribution

If you want to make the process easier, you can make a donation to the porteus team and, normally, they will build a custom version for you. You can have a preview of what is possible (adobe reader, skype, etc.) by using the custom image available for download.

I didn't try to use or install a porteus package or slackware (txz2xzm command ?) inside kiosk. Maybe it could work. You could, apparently, use openbox and tint2 to make a small gui interface.

Instead, I tried to use and modify the xzm packages that you can already find inside the iso files provided. Just so you know, most of the script are inside /opt/porteus-scripts.

Uncompress iso

mkdir custom

cp - a /mnt/cdrom/* custom/

You will then find all the system files and packages inside the "xzm" folder.

You can also use this command to uncompress iso files :

7z x Porteus-Kiosk-3.4.0-i486.iso

Make your changes

In that folder, you will have different interesting files. The most interesting ones are inside "settings.xzm", this package contains most of the system files and that's where you can make a lot of modification. To uncompress it, use unsquashfs, for example :

unsquashfs 003-settings.xzm

The interesting paths in my use-case scenario are :


For firefox

You can change the profile inside /home/guest/.mozilla, I would suggest to try to implement the autoconfig feature to centralize the configuration and be able to add new add-ons at will.
If you want to create a "model" profile for firefox, copy the default profile inside this folder, launch firefox with this default porteus profile, make your modifications (settings, add-ons) and then overwrite it.

For chrome

Install it under your favorite linux distribution :

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

Copy the folder /home/guest/.config/google-chrome inside your home folder then launch google-chrome.

Make all the modification you need, for example, I changed the language settings to french and I installed :

You can also change very specific settings inside chrome by typing in the address bar (more information here) :


When finished overwrite the new profile. And please make sure the owner of the folder is not root !

Kiosk mode

Chrome comes with a kiosk mode (without address bar or tabs), by adding "--kiosk" parameter. If you want to active it under Porteus kiosk, you will have to add inside /home/guest/.mozilla/firefox/c3pp43bg.default/chrome/userChrome.css (under line "@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there....") :

statuspanel { display:none!important; }

With that line, the kiosk mode will be automatically handled by the porteus gui script.

Make new xzm

Once you've done with your modifications, to create the new modified xzm, use :

mksquashfs settings/ 003-settings.xzm -comp xz -b 256K -Xbcj x86 -noappend

Mount iso

Instructions are available on porteus website

mkdir /tmp/kiosk_ISO
mount -o loop kiosk.iso /mnt/cdrom

Copy files

cp -a /mnt/cdrom/* /tmp/kiosk_ISO/
umount /mnt/cdrom

Overwrite xzm

Copy your modified xzm inside the default iso :

mv 003-settings.xzm /tmp/kiosk_ISO/xzm/

Make the new iso file

mkisofs -o ../Porteus-Kiosk.iso -l -J -joliet-long -R -D -A "Porteus-Kiosk" -V "Porteus-Kiosk" -no-emul-boot -boot-info-table -boot-load-size 4 -b boot/isolinux/isolinux.bin -c boot/isolinux/isolinux.boot $efi .

To flash it on USB drive (adapt sdb to the real device of your USB) :

dd if=Porteus-Kiosk.iso of=/dev/sdb


When you try to see the results and logs under SSH, you will want to launch the browser to see if everything works fine. Change the display to do it :

DISPLAY=:0.0 /usr/bin/chrome --kiosk http://pascal-mietlicki.fr

Screen rotation

If you want to rotate the screen, you will find some information on :

For example, with a left rotation, I had to use this xinput command :

DISPLAY=:0.0 xinput set-prop 'Quanta OpticalTouchScreen' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1

If you want to integrate it inside your ISO files, you can normally use /etc/rc.local that you have to make executable before (with chmod +x rc.local). Inside rc.local, you can use "guiexec=scriptaftergui" or "cliexec=scriptbeforegui".

If it does not work, you can add a file inside etc/X11/xorg.conf.d called 99-calibration.conf for example with :

Section "InputClass"
    Identifier    "RotateTouchCW"
    MatchProduct    "Quanta OpticalTouchScreen"
    Option    "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"

Add scripts

All the porteus scripts are inside the folder : /opt/porteus-scripts
The main script that launches firefox or chrome is called "gui-app" so you can modify it if you want to add some options like "--allow-running-insecure-content", etc.

Tags: associatif, borne, kiosk, kiosque, porteus, rpm