Once you are up and running your VM, log in as root or use "su -" to become root
Enable SSH on the VM with the following commands:
Code: Select all
# chmod +x /etc/rc.d/rc.sshd
# /etc/rc.d/rc.sshd start
Download the ISO and xzm modules for the version you are working with from http://porteus-kiosk.org/public/ (this example uses 3.7 folder)
Code: Select all
# wget -r --no-parent --reject "index.html*" http://porteus-kiosk.org/public/3.7/
Code: Select all
# cd porteus-kiosk.org
Code: Select all
# mkdir -p private/3.7/
Code: Select all
# mkdir -p xzm-unpacked/3.7/
Code: Select all
# mount -o loop public/3.7/Porteus-Kiosk-3.7.0-i586.iso /mnt/cdrom
# mkdir private/3.7/kiosk_ISO
# cp -a /mnt/cdrom/* private/3.7/kiosk_ISO/
# umount /mnt/cdrom
Code: Select all
# cp private/3.7/kiosk_ISO/xzm/* public/3.7/
Code: Select all
# mkdir xzm-unpacked/3.7/003-settings
# xzm2dir public/3.7/003-settings.xzm xzm-unpacked/3.7/003-settings
********************************
In this example we will change the default chrome search provider, remove the "sleep" button from the ctl-alt-del menu, and change the installer/default background image.
This is done in the unpacked xzm modules.
********************************
********************************
It was pointed out that the purpose of the xzm modules and file system model is to be flexible, and modifying the core modules is usually unnecessary.
I still would recommend unpacking them to better understand how Porteus-Kiosk works, as i would not have found the files i wanted to modify without doing so.
With that in mind, i will leave this section here so people know how to do it, but i have added a section on creating your own module for these changes.
********************************
Use your prefered text editor to modify these files, I will use vi for some reason (thanks dad)
To change the default chrome search provider to Google:
Code: Select all
# vi xzm-unpacked/3.7/003-settings/etc/opt/chrome/policies/managed/chrome.json
and change it to "DefaultSearchProviderName": "Google",
Find the line that reads "DefaultSearchProviderSearchURL": "https://duckduckgo.com/?t=porteus&q={searchTerms}",
and change it to "DefaultSearchProviderSearchURL": "https://www.google.com/search?q={searchTerms}",
To remove the "Sleep" button from the ctl-alt-del menu:
Code: Select all
# vi xzm-unpacked/3.7/003-settings/opt/porteus-scripts/exit-kiosk
find the <window> element opening line, at the end change the 'height-request="250"'
to 'height-request="195"' so there is not extra space at the bottom of the ctl-alt-del menu.
(reduce by approx 55px for each button removed)
After you are done making changes, you need to create a new xzm module for the custom ISO. This will overwrite the existing xzm file
# dir2xzm xzm-unpacked/3.7/003-settings/ private/3.7/kiosk_ISO/xzm/003-settings.xzm
********************************[/i]
********************************
Instead of modifying the default modules, lets create our own xzm.
Code: Select all
# mkdir xzm-unpacked/3.7/005-custom
Code: Select all
# mkdir -p xzm-unpacked/3.7/005-custom/opt/porteus-scripts/
# mkdir -p xzm-unpacked/3.7/005-custom/etc/opt/chrome/policies/managed/
Code: Select all
# cp xzm-unpacked/3.7/003-settings/opt/porteus-scripts/exit-kiosk xzm-unpacked/3.7/005-custom/opt/porteus-scripts/
# cp xzm-unpacked/3.7/003-settings/etc/opt/chrome/policies/managed/chrome.json xzm-unpacked/3.7/005-custom/etc/opt/chrome/policies/managed/
To change the default chrome search provider to Google:
Code: Select all
# vi xzm-unpacked/3.7/005-custom/etc/opt/chrome/policies/managed/chrome.json
and change it to "DefaultSearchProviderName": "Google",
Find the line that reads "DefaultSearchProviderSearchURL": "https://duckduckgo.com/?t=porteus&q={searchTerms}",
and change it to "DefaultSearchProviderSearchURL": "https://www.google.com/search?q={searchTerms}",
To remove the "Sleep" button from the ctl-alt-del menu:
Code: Select all
# vi xzm-unpacked/3.7/005-custom/opt/porteus-scripts/exit-kiosk
find the <window> element opening line, at the end change the 'height-request="250"'
to 'height-request="195"' so there is not extra space at the bottom of the ctl-alt-del menu.
(reduce by 55px for each button removed)
Create the module and add it to the kiosk_ISO folder for inclusion with new ISO
Code: Select all
# dir2xzm xzm-unpacked/3.7/005-custom/ private/3.7/kiosk_ISO/xzm/005-custom.xzm
The default background image for porteus kiosk is found at private/3.7/kiosk_ISO/docs/default.jpg
Replacing this file with your own image will change it across the board, unless the "wallpaper=" parameter is set in a config file. The original image is 1600x1000 pixels. (not in a xzm module)
********************************
Add the extra modules to the ISO so they don't have to be downloaded from the internet for this to have any benefit, the initial configuration of the kiosk must have these parameters:
Code: Select all
additional_components=08-ssh.xzm 09-x11vnc.xzm 10-printing.xzm uefi.zip
Code: Select all
# cp public/3.7/08-ssh.xzm private/3.7/kiosk_ISO/xzm/
# cp public/3.7/09-x11vnc.xzm private/3.7/kiosk_ISO/xzm/
# cp public/3.7/10-printing.xzm private/3.7/kiosk_ISO/xzm/
# cp public/3.7/uefi.zip private/3.7/kiosk_ISO/xzm/
# cp public/3.7/002-chrome.xzm private/3.7/kiosk_ISO/xzm/
Code: Select all
# cd private/3.7/kiosk_ISO/
# ./make_iso.sh
Code: Select all
# cd ..
# mv Porteus-Kiosk.iso PK-3.7.0-ACME-17Jun2016-beta3.iso
To create an ISO for use with a USB drive:
Install the syslinux package from the slackware repository (change /mnt/sda1 to your media)
Code: Select all
# cd ~
# mkdir slackware-packages
# cd slackware-packages
# wget https://slackbuilds.org/mirror/slackware/slackware-14.1/slackware/a/syslinux-4.06-i486-1.txz
# txz2xzm syslinux-4.06-i486-1.txz
# cp syslinux-4.06-i486-1.xzm /mnt/sda1/porteus/optional/
# activate /mnt/sda1/porteus/optional/syslinux-4.06-i486-1.xzm
# cp /mnt/sda1/porteus/optional/syslinux-4.06-i486-1.xzm /mnt/sda1/porteus/modules/syslinux-4.06-i486-1.xzm
Run the next commands to make your ISO bootable on a USB drive
Code: Select all
# cd ~/porteus-kiosk.org/private/3.7/
# isohybrid PK-3.7.0-ACME-17Jun2016-beta3.iso
The USB must be written with a program like Win32DiskImager (see kiosk download page for link)
Keep in mind that this custom ISO is unlikely to be compatible with updates in the future or your changes could be overwritten, so record your customizations for future use!*
*Keeping your custom settings and configuration in a separate xzm module is much easier to manage in the event of an update, since they are kept separate from the core of Porteus Kiosk.
Its probably not recommended to add both chrome and firefox to the default ISO (or either according to the developers haha), just the one you plan to use. if remote config is enabled, it will download from the porteus kiosk site if you change it in the future.
Feedback is always welcome

RESOURCES:
http://porteus-kiosk.org/kiosk-customization.html
http://porteus-kiosk.org/modules.html
http://porteus-kiosk.org/download.html