{"id":1056,"date":"2011-05-07T18:14:35","date_gmt":"2011-05-07T22:14:35","guid":{"rendered":"http:\/\/www.braindeadprojects.com\/blog\/?p=1056"},"modified":"2011-08-23T14:50:36","modified_gmt":"2011-08-23T18:50:36","slug":"customizing-the-webconverger-kiosk-the-fast-way","status":"publish","type":"post","link":"http:\/\/www.braindeadprojects.com\/blog\/what\/customizing-the-webconverger-kiosk-the-fast-way\/","title":{"rendered":"Customizing the WebConverger Kiosk &#8211; The fast way"},"content":{"rendered":"<p>Recently I was asked to assist a co-worker find a good locked down Kiosk solution for a local coffee shop. The project requirement was small &#8211; mostly just a simple browser.<\/p>\n<p>There seems to have been a LOT of Linux based Kiosk projects out there, most of them now deprecated. After a bit of searching, I came across a good one &#8211; <a title=\"WebConverger\" href=\"http:\/\/webconverger.org\/kiosk\/\">WebConverger<\/a>.<\/p>\n<figure id=\"attachment_1057\" aria-describedby=\"caption-attachment-1057\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/webconverger.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1057\" title=\"webconverger\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/webconverger-300x225.png\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/webconverger-300x225.png 300w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/webconverger.png 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1057\" class=\"wp-caption-text\">Webconverger<\/figcaption><\/figure>\n<p>Webconverger is a Live Debian build, created and maintained by Kai Hendry using the <a title=\"Debian Live\" href=\"http:\/\/live.debian.net\/\" target=\"_blank\">Debian Live-builder packages<\/a>. The LiveCD includes the lightweight\u00a0 <a title=\"Dynamic Window Manager\" href=\"http:\/\/dwm.suckless.org\/\" target=\"_blank\">Dynamic Window Manager (DWM) <\/a> , the <a title=\"IceWeasel\" href=\"http:\/\/wiki.debian.org\/Iceweasel\" target=\"_blank\">IceWeasel browser<\/a> with Webconverger kiosk extension (to lock things down), and&#8230; well that&#8217;s about it.<\/p>\n<p>Kai has <a title=\"WebConverger for Developers\" href=\"http:\/\/webconverger.org\/develop\/\" target=\"_blank\">excellent documentation<\/a> on rolling your own Webconverger LiveCD using his GIT repository, although being pressed for time I opted to go the <a title=\"BrainDeadProjects\" href=\"http:\/\/www.braindeadprojects.com\" target=\"_blank\">BraindeadProjects<\/a> route: Just modify <a title=\"Webconverger ISO\" href=\"http:\/\/download.webconverger.com\/\" target=\"_blank\">his already released ISO<\/a>.<\/p>\n<p>To begin modifying it in this manner, first mount the iso using a loopback device:<\/p>\n<blockquote><p>#mkdir \/mnt\/webconverger<br \/>\n#mount -o loop webc-7.2.iso \/mnt\/webconverger<\/p><\/blockquote>\n<p>Next mount the <a title=\"Squash FS\" href=\"http:\/\/squashfs.sourceforge.net\/\" target=\"_blank\">SquashFS<\/a> image, also using a loopback device:<\/p>\n<blockquote><p>#mkdir \/mnt\/webconverger-filesystem<br \/>\n#mount -o loop -t squashfs \/mnt\/webconverger\/live\/filesystem.squashfs \\<br \/>\n\/mnt\/webconverger-filesystem<\/p><\/blockquote>\n<p>As these two mounts are readonly, we need to create editable copies of each.<\/p>\n<blockquote><p>#mkdir \/devel\/isolinux<br \/>\n#rsync -av \/mnt\/webconverger\/ \/devel\/isolinux\/<\/p>\n<p>#mkdir \/devel\/squashfs<br \/>\n#rsync -av \/mnt\/webconverger-filesystem\/ \/devel\/squashfs\/<\/p><\/blockquote>\n<p>Now we can go about modifying these two directories. Changing out the <a title=\"ISOLINUX\" href=\"http:\/\/syslinux.zytor.com\/wiki\/index.php\/ISOLINUX\" target=\"_blank\">ISOLINUX<\/a> boot splash image is an easy start. The image found under \/devel\/isolinux\/isolinux\/splash.png is actually an LSS16 image. To replace it, take or create an image 640&#215;480 in size, and convert it to 14 indexed colors. (In GIMP, these options are under Image\/Index)<\/p>\n<figure id=\"attachment_1115\" aria-describedby=\"caption-attachment-1115\" style=\"width: 260px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/indexed-gimp-splash.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1115\" title=\"Indexing Colors in Gimp\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/indexed-gimp-splash-260x300.png\" alt=\"\" width=\"260\" height=\"300\" srcset=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/indexed-gimp-splash-260x300.png 260w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/indexed-gimp-splash.png 355w\" sizes=\"(max-width: 260px) 100vw, 260px\" \/><\/a><figcaption id=\"caption-attachment-1115\" class=\"wp-caption-text\">Indexing Colors in Gimp<\/figcaption><\/figure>\n<p>Once complete, save your image in <a title=\"PPM\" href=\"http:\/\/netpbm.sourceforge.net\/doc\/ppm.html\" target=\"_blank\">PPM format<\/a>.<\/p>\n<p>Next, you&#8217;ll need the syslinux package installed on your machine. The syslinux package includes a handy utility to convert PPM to LSS16 (for use as a bootsplash image)<\/p>\n<blockquote><p>#ppmtolss16 &lt; \/tmp\/myimage-boot.ppm &gt; splash.png<\/p><\/blockquote>\n<p>Since you&#8217;re already working on the ISOLINUX side of things, I recommend looking at and revising your boot menu. Once I have an image that I&#8217;m happy with, I set the following options to prevent someone from rebooting the Kiosk and tampering with boot parameters:<\/p>\n<blockquote><p>menu background \/isolinux\/splash.png<br \/>\ndefault \/isolinux\/vesamenu.c32<br \/>\nnoescape 1<br \/>\nnocomplete 1<br \/>\nprompt 0<br \/>\ntimeout 15<br \/>\nallowoptions 0<\/p><\/blockquote>\n<p>While you can nest a number of ISOLINUX boot configs together, I generally keep it to one file that includes the above directives. Dont&#8217; forget to include at least one label for a kernel to boot.<\/p>\n<p>After updating the Boot Splash screen, have a look at \/devel\/squashfs\/home\/webc\/pb.sh. This script is what causes IceWeasel to start, restart if closed, and sets the desktop background image (amongst other things). This script also downloads a background image from your homepage at boot &#8211; which can come in handy if you want to rotate daily ads.\u00a0 I&#8217;ve personally modified my installation to always load the same background image, and fullscreen that image.<\/p>\n<p>The webpage that appears each time IceWeasel starts is passed as kernel boot parameter (homepage). To update the homepage, simply edit the labels in the ISOLINUX\u00a0 directory.<\/p>\n<p>You will notice that when pressing the home button in the browser however, that you&#8217;re actually taken to an about: page that gives details about the current IceWeasel build. To configure this homepage, look at \/usr\/lib\/iceweasel\/browserconfig.properties<\/p>\n<blockquote><p>browser.startup.homepage=www.braindeadprojects.com<\/p><\/blockquote>\n<p>I personally like to lock things down a bit more than the standard release. For that reason I also add the following to \/etc\/iceweasel\/pref\/local.js<\/p>\n<blockquote><p>pref(&#8220;network.protocol-handler.external.snews&#8221;, false);<br \/>\npref(&#8220;network.protocol-handler.external.news&#8221;, false);<br \/>\npref(&#8220;network.protocol-handler.external.irc&#8221;, false);<br \/>\npref(&#8220;network.protocol-handler.external.mail&#8221;, false);<br \/>\npref(&#8220;network.protocol-handler.external.mailto&#8221;, false);<\/p><\/blockquote>\n<p>Another thing that may prove beneficial is to remove any and all remnants of xterm. As xorg does depend upon xterm, it will have to be forceably removed. This is best done in a chroot environment<\/p>\n<blockquote><p>#chroot \/devel\/squashfs\/ \/bin\/bash<br \/>\n#dpkg &#8211;force-all -p xterm<br \/>\n#exit<\/p><\/blockquote>\n<p>Once you have your modifications complete, you will want to re-squash the squash filesystem. To do this, you&#8217;ll need squashfs-tools version 4 (Centos is currently distributing version 3, so do keep that in mind). Squashing using version 3 of the tools will result in a non-bootable kiosk.<\/p>\n<blockquote><p>#mksquashfs \/devel\/squashfs\/ \/tmp\/webc.squashfs<br \/>\n#mv \/tmp\/webc.squashfs \/devel\/isolinux\/live\/filesystem.squashfs<br \/>\n#cd \/devel\/isolinux\/<br \/>\n#mkisofs -o \/tmp\/my-webc.iso -b -r -J -l -cache-inodes -allow-multidot -no-emul-boot \\<br \/>\n-boot-load-size 4 -boot-info-table -b\u00a0 isolinux\/isolinux.bin -c isolinux\/boot.cat \\<br \/>\n\/devel\/isolinux<\/p><\/blockquote>\n<p>Finally, isohybrid your ISO:<\/p>\n<blockquote><p>isohybrid \/tmp\/my-webc.iso<\/p><\/blockquote>\n<p>I highly recommend testing your ISO image in <a title=\"VirtualBox\" href=\"www.virtualbox.org\/ \" target=\"_blank\">VirtualBox<\/a>. Using VirtualBox (or any other virtualization option), saves you from constantly burning an image to\u00a0 a CD or USB drive. Be mindful that you can skip the isohybrid step and test with VirtualBox, although you won&#8217;t be able to install it later using dd.<\/p>\n<p>Once you have an image that you&#8217;re happy with, use dd to copy the ISO onto the hard drive of your Kiosk machine. Personally, I copy my ISO to a USB thumbdrive running the Gentoo Based\u00a0 <a title=\"System Rescue CD\" href=\"http:\/\/www.sysresccd.org\/Main_Page\" target=\"_blank\">System Rescue CD<\/a>, boot into it and then install onto the harddrive:<\/p>\n<blockquote><p>dd if =\/livemnt\/boot\/kiosk\/my-kiosk.iso of=\/dev\/sda<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>Of course, one could save time and simply use the <a title=\"WebConvergers Customization Service\" href=\"http:\/\/webconverger.com\/buy\/\" target=\"_blank\">WebConverger Customization Service<\/a>&#8230; but why not use this as an opportunity to sharpen one&#8217;s skills.<\/p>\n<p>Coming soon to &#8211; a walkthrough on how to build and customize a WebConverger ISO from Kai&#8217;s GIT repository (as opposed to re-rolling his ISO).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I was asked to assist a co-worker find a good locked down Kiosk solution for a local coffee shop. The project requirement was small &#8211; mostly just a simple browser. There seems to have been a LOT of Linux based Kiosk projects out there, most of them now deprecated. After a bit of searching, &hellip; <a href=\"http:\/\/www.braindeadprojects.com\/blog\/what\/customizing-the-webconverger-kiosk-the-fast-way\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Customizing the WebConverger Kiosk &#8211; The fast way<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,30,1],"tags":[],"class_list":["post-1056","post","type-post","status-publish","format-standard","hentry","category-gimp","category-kiosk","category-what"],"_links":{"self":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/1056"}],"collection":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/comments?post=1056"}],"version-history":[{"count":55,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/1056\/revisions"}],"predecessor-version":[{"id":1371,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/1056\/revisions\/1371"}],"wp:attachment":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/media?parent=1056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/categories?post=1056"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/tags?post=1056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}