What are Porteus modules?

Instead of the traditional style of downloading a program and installing it, Porteus uses a file called a module which are activated (installed) or deactivated (uninstalled) by moving them inside or outside of the /xzm folder in the kiosk ISO. This feature makes installing applications very simple and you don't clutter up your device with thousands of rarely used files. Modules are similar to zip archives in that they are compressed and they can contain multiple files and directories. The file extension of Porteus modules is .xzm and every module must have this suffix otherwise it wont be loaded during system boot.

Porteus modules are compressed using the LZMA2 compression algorithm and a squashfs filesystem. LZMA compression is known for it's fast decompression rate. The modules in the /xzm folder contain multiple packages in one module so if you are looking to remove or extract a package or single file from a module you will need to decompress the xzm archive.

NOTE: all commands presented below must be executed as user root otherwise file permissions may break causing unexpected kiosk behaviour

If you want to decompress a module called '002-firefox.xzm', you have to install squashfs-tools package on your favorite Linux operating system and issue following command in the console:

    unsquashfs 002-firefox.xzm

It will unpack the Firefox module to the 'squashfs-root' folder.

Likewise, one can create their own modules. Imagine that you have a script that does something useful and you want this script to be present in /usr/bin directory once the kiosk boots up. All you need to do is to create a fakeroot /usr/bin folder in for example /tmp directory and put the script in there:

    mkdir -p /tmp/fakeroot/usr/bin

    cp script.sh /tmp/fakeroot/usr/bin

Now you can create a module from the fakeroot folder:

    mksquashfs /tmp/fakeroot /tmp/newmodule.xzm -comp xz -b 256K -Xbcj x86 -noappend

then move it to the /xzm folder of your unpacked kiosk ISO and create new ISO with the make_iso.sh script.

NOTE: Porteus Kiosk 4.0.0 and later switched to 64bit architecture. For these versions you must place your libraries and relevant files (e.g. wifi firmware) in /lib64 and /usr/lib64 folders rather than /lib, /usr/lib otherwise system may not work correctly.

NOTE: module names starting with number, number and followed by dash (e.g. "12-website.xzm") are reserved for additional components parameter. Please remember to name your custom modules without any number at the begining (e.g. "website.xzm") otherwise kiosk will try to download these modules from our server and fail to reconfigure.

Please follow this document to find how to perform manual Kiosk ISO customizations.