Linux Kiosk

Using Ubuntu, Firefox with OpenKiosk Extension, Remastersys (and MasterISO)

Looking for a no install live cd only? check here Slax 5 Based Opac Kiosk (Live CD No Install)

Install is usually preferable, as LiveCDs tend to be a bit slow.

Setting up Tools

Install Virtual Box.

Note: While using Virtual box, you can press the Right CTRL button (by default) to release the mouse and go back to using your computer instead of the Virtual Box virtual machine.

Download Ubuntu Server Iso.

Be sure to download 32bit version, as 64bit version may not work with older computers(which are more likely to be used for an Opac).

Begin Creating the Kiosk

Create a Linux VM named Ubuntu in VirtualBox . (Mount Ubuntu ISO file as CD/DVD.)

Username: administrator

Password: * (pick a password here and remember it, don’t just put in *)

Hostname: LIBRARYNAME-kiosk

Don’t worry about the command prompt when you see it, we will install the GUI in the second section below labeled “Install Ubuntu-Desktop-Minimal”

Log in to the Ubuntu VM as administrator, using the password you typed in above.

Run updates.

sudo apt-get update && sudo apt-get -y upgrade

Tuning distro

Install Ubuntu-Desktop-Minimal.

sudo apt-get -y install gnome-core gdm network-manager-gnome fast-user-switch-applet human-theme x11-xserver-utils tangerine-icon-theme gnome-themes-ubuntu ubuntu-artwork jockey-gtk gnome-screensaver gnome-utils

sudo apt-get install -y gcalctool tsclient

Begin Setup of Browser

Install Firefox & USplash.

sudo apt-get install -y firefox usplash

Reboot the VM and log in again as administrator.

sudo reboot now

(At this point I like to set my Firefox homepage to http://wiki.koha.org/doku.php?id=ubuntu_9.04_based_opac_kiosk so I can copy & paste from here but it's optional.)

Setup repository of Tools for Creating CD

Enable repositories:

System > Administration > Synaptic Package Manager > Settings > Repositories > Third-Party Software.

Put a Check in the checkbox next to partner.(no need for partner(Source Code)

Click Add(under Third-Party Software), and type in:

deb http://www.geekconnection.org/remastersys/repository ubuntu/

Then click on what you just typed in, which should be the last item in the list, choose Edit, it and add Comment Remastersys.

Click Close, Close, and then click on Reload.

Then click Mark all upgrades, Click mark if prompted. Then click Apply.

Add Browser Plugins(optional)

Click on Applications, Accessories, Terminal to bring up the command line to

Install Adobe Reader, Flash and Java.

Then type in: sudo apt-get install -y acroread adobe-flashplugin flashplugin-installer sun-java6-jre sun-java6-plugin sun-java6-fonts

(note you cannot do this while Synaptic Package Manager is still updating/Downloading Package Files)

OPTIONAL: If you use OCS to keep track of inventory, now would be a good time to install the OCS Inventory Agent.

In this case: Go to ocs-inventoryag.org, click on download, and then click on 1.02.1

Download linux version.

Open command prompt and type in:

Cd Desktop

Tar zxvf ocs(then press tab and enter) Install Prerequisites

Sudo apt-get install libxml-simple-perl libnet-ip-perl liblwp2 liblwp-dev procinfo make

Perl Makefile.PL

Make

Sudo Make install

Actually Install Tools for Creating CD

Install Remastersys.

sudo apt-get install -y –force-yes remastersys (double minus before force)

Clean up.

sudo apt-get autoremove -–y

Create Kiosk User

Create a limited user account,

System > Administration > Users and Groups > Add User.

If the option is greyed out, choose unlock, type administrators password, and then click Add User.

Username: patron

Password: patron

Under User Privileges tab deselect all options that seem inappropriate(everything).

Create/Add Bootup Screen so user does not see Linux Boot-up information

NOTE: This will have to be changed before upgrading to 9.10

Karmic (9.10) uses an X-based splash screen, not USplash.

First Time: Install Custom Usplash(this will probably take some time. After you create one, just save it once and back it up somewhere so you can copy it should you need to make a new one). This is the screen that is displayed as the computer boots up. With Ubuntu 9.04, you can create a splash screen. Recommended default is Maximum 200×200(keep in mind the screen is going to be minimum of 600×400) with 256 colors(8bit) interlaced, saved as a PNG graphic file.

You will need to run from the terminal: Sudo apt-get install imagemagick libusplash-dev gcc make In order to use usplashmaker below. UsplashMaker 1.04 You have to download the two files: Make USplash 1.04.tar.gz and Tum-Data.tar.gz After they both download, go to Places, Home Folder, Create a Folder called “Tum”, and drag the Tum-Data.tar.gz file into the Tum folder. Extract the files from the zip file into this folder, and then go into the WorkInProgress subfolder, and modify the usplash-theme-ubuntu.c file. You will want to match the text box position, size and the two other values to the progress bar position and size and the two other values for each resolution, so that the text is covered up by the status bar.

Double click on the USplash 1.04.tar.gz file, and you will see a new file appear on your desktop called Make USplash.tar.gz, that looks like a CDRom. Open it, and then drag the file to the desktop. Download the PNG file you created to the desktop. One way would be to post it to a website, browse to that website, and then save the file from the website to the desktop, or email it to yourself, or ncat(remove after using) or……………. Applications, Accessories, Terminal Type in

/bin/bash “Make Usplash 1.04” /home/administrator/desktop/NAMEOFYOURPNGFILE.png

If there is a problem, you will see a bunch of warning messages about unsigned integers: if this is the case, you will want to resize the graphic, as it may be too big. Graphic must be smaller than 600×400, and suggest use white background, as it will be stretched to fit the screen. After you have run the above in the terminal, you will see a file appear on the desktop labelled NAMEOFYOURPNGFILE.so There may be some issues with make dependencies…….haven’t been able to resolve those or figure out why right now. If you run this more than once, you should delete the makefile and the so file from the directory you are working in. You will want to copy that file to a safe place so you don’t have to do this again! An example would be the image below, minus the password box, etc. Comment:(perhaps we could setup a website to do this for people?) After you have created a boot screen: If you have backed it up, put it someplace you can download it, and then download it (if you want an example, use this one usplash-theme-ppl.so) to /home/administrator/ sudo mv NAMEOFPNGFILEABOVE.so /usr/lib/usplash/

sudo ln -sf /usr/lib/usplash/NAMEOFPNGFILEABOVE.so /usr/lib/usplash/usplash-artwork.so

sudo update-initramfs -–u (this has to be done each time, different for 32 or 64 bit systems) If a blank screen replaces usplash try BIOS setup > “Intergrated Devices (LegacySelect Options)” > “Onboard Video Buffer” Change 1 MB to at least 8 MB. (If BIOS pw-locked on gx260 then remove pwds pin on motherboard to wipe.)

Install custom GDM Login screen

Note: This is no longer valid for Ubuntu 9.10 Karmic Koala.

System > Administration > Login Window > Local, add PPL GDM Theme.tar.gz. Change Background Color to white. If you cannot read everything here(screens too long), press Shift+CTRL+TAB, pressing the tab button until you see it at the top menu section of the screen. After you get it here, press the Tab button 3 times, and click enter.

Install custom screensaver

Download ppl-kiosk.desktop

sudo mv ppl-kiosk.desktop /usr/share/applications/screensavers/

Note: There is a slight bug in the screensaver. You must click or press a key to exit the screensaver. Just moving the mouse will not suffice.

Set timed login.

System > Administration > Login Window Under the Security tab select 'Enable timed login', select the user 'patron' and set the timer to 10 seconds.

Set Firefox/Browser and user Background Settings

Log out. Log in as patron.

Set the Firefox Home Page to http://YOURURL.com Open Firefox, then Edit, Preferences, Uncheck 'Show downloads', save to /home/patron/Documents Click on the Security Tab, and uncheck 'Save passwords' or ‘Remember passwords for sites’ Customize desktop. Save ppl-wallpaper_tile.gif

to /home/patron/Pictures. Settings > Desktop. Add ppl-wallpaper_tile.gif. Tiled.

OR Right click on desktop, choose “Change Desktop Background” Click on Add, Choose ppl-wallpaper_tile.gif, then next to set Style: Tiled Click Close. Add ppl-wallpaper_tile.gif. Tiled.

Disable Firefox session restore.

In a new tab enter about:config in the address bar. Find the preference settings for

  • browser.sessionstore.resume_from_crash
  • browser.sessionstore.resume_session_once

and toggle their values to false(you can do this by double clicking on them, the font for these settings will change to bolded when you do).

Open a PDF to accept Adobe license agreement(If you installed adobe acrobat).

Install the Open Kiosk Firefox addon.

Save jsLib and OpenKiosk xpi files. Open each with Firefox to install. Configure OpenKiosk. In Firefox, Tools > OpenKiosk > Settings. In Browser tab:

• Set Home Page and Attract Screen to http://YOURURHERE.

• Check Enable Attract Screen.

• Check Set the Kiosk as your default Mozilla browser.

• Set default Kiosk browser mode to Full Screen

In Filters tab:

• Check Enable JavaScript on all pages

In Sessions tab:

• Confirm Set Inactive Terminal is checked and reset is set to 1 minute.

In Customize tab:

• Uncheck Location bar and all UI Widgets below it EXCEPT FOR RESET BUTTON or those that you wish to include (If a user clicks on the koha logout, and then clicks on one of the back buttons and clicks resend, they can access the logged in users data. At EBPL, we have chosen to include the reset button and the font size buttons).

In Admin tab:

• Set the password to the administrator login password.

Launch Firefox on boot.

System > Preferences > Startup Applications > Add

Name = Firefox

Command = firefox

Note on Reconfiguring OpenKiosk(has to be done as user

• firefox -kiosk : Launch the Kiosk in full screen mode • firefox -kiosk mode=title : Launch the Kiosk with a titlebar

• firefox -kiosk about : Launch the About window

• firefox -kiosk admin : Launch the Admin Settings window

The startup file that loads firefox for the patron is located below:

/home/username/.config/autostart/firefox.desktop

The command for entering admin mode so you don’t have to constantly type sudo is:

sudo su

Screensaver (adding JPG images)

Download the images(recommend minimum of 5) to /home/patron/Pictures/YOURLIBRARYNAME-screensaver:

• the idea is to make the JPG files and save them in a decent resolution(ie 1680×1260), and then number them numerically so that there is some order to them, ie 1.jpg, 2jpg etc.: • cd ~ sudo nano .xscreensaver (you may have to switch sessions back to administrator, then open up a terminal and type in “cd /home/patron/” before doing the above command. Paste imageDirectory: /home/patron/Pictures/YOURLIBRARYNAME-screensaver chooseRandomImages: True

Press CTRL+O and enter to save the file. Then go to the GUI and System > Preferences > Screensaver Select PPL-Kiosk. 5 Minutes.

Power Management

System > Preferences > Power Management

In On AC Power tab:

• Slide Put display to sleep when inactive for to Never.

In General tab

• Set When the power button is pressed to Shutdown.

Disable Keyboard Shortcuts

System > Preferences > Keyboard Shortcuts (Select and Backspace to Disable)

Add printing setup(if you wish)

If you run into problems printing (printing PDF's return “Print Process Returned Error”), you need to do the following: From a terminal window, type in:

  • sudo apt-get install cupsys-bsd

Nothing else needs to be done, and PDF's will now print.

Remove panels.

Delete the upper panel. Remove everything from the bottom panel. Under Panel Properties check 'Autohide' and set the background to transparent.

X out of the Virtual Machine Kiosk, and choose Shutdown. Then choose Start from the main Virtual Box screen to reboot the system. Log in as administrator.

Disable printing/firefox autoupdate(optional).

sudo su

cd /home/patron/.mozilla/firefox/

Find and 'cd' into the [random].default directory.

nano prefs.js

Add to EOF

user_pref(“print.always_print_silent”,true);

user_pref(“print.show_print_progress”,false);

user_pref(“app.update.auto”, false); (this would turn off the auto-update feature)

Set autologin

System > Administration > Login Window Under the Security tab select 'Enable automatic login' and select the user 'patron'

Create ISO

Create a backup using Remastersys, System > Administration > Remastersys. Choose Backup when given a list of options. If you are running this more than once, remember to clean out the temp directory first before running Backup when given the list of options.

After you have created the iso, make sure you go back to System, Administration, Login, and turn off autologin of user patron. This way you don’t lock yourself out of the Virtual Machine.

(I'm assuming development on Ubuntu, if you're using Windows from this point you're on your own. Hint: Install VirtualBox addons to create a shareable folder to drop the ISO. ISO Master is available for Windows but is not free. To do this you will have to install the linux headers. Choose Devices, Install Guest Add-Ons. Then, click Places, VBOXEAdditions, and double click on autorun.sh. After you do this, you will probably get an error message: pay attention to the line that says “The current kernel version is NUMBERLIKE2.6.28-16-server” use what it says here(NUMBERLIKE2.6.28-16-server) to do the following from applications/accessories/terminal box: Sudo apt-get install linux-headers-NUMBERLIKE2.6.28-16-server) After you do this, rerun the autorun.sh file, by double clicking and choosing Run.

Move the LiveCD ISO from the Guest VM to the Host machine(not necessarily necessary if you are able to use the network to connect to another computer to move the iso file, which will be located in /home/remastersys/custombackup.iso). One way would be to utilize your existing network to transfer the file, or to put it on an ftp server, etc. Otherwise you could do the following, or choose the shared folder if you install the Virtual Box tools. sudo apt-get install openssh-server Warning: Only do this after creating the backup since we do not want openssh-server running on our production LiveCD.

On the Host machine:

VBoxManage setextradata Ubuntu “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort” 2222

VBoxManage setextradata Ubuntu “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort” 22

VBoxManage setextradata Ubuntu “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol” TCP

scp -P 2222 administrator@localhost:/home/remastersys/remastersys/custombackup.iso ppl-kiosk-base.iso

We're not done yet. Using ISO Master/UltraIso or another ISO editing tool of your choice make the following changes: Copy /isolinux/isolinux.txt to isolinux/isolinux.txt.bak. Alter /isolinux/isolinux.txt (BE SURE TO DO THIS UNDER LINUX OR SYSTEM WILL NOT WORK/BOOT)to read:

Please wait while the INSERTNAMEHERE Public Library Catalog Kiosk loads…

This removes the list of boot options at boottime…

Edit the TIMEOUT line in /isolinux/isolinux.cfg to read TIMEOUT 1.

(Restore these to enable installation.)

Burn the LiveCD.

OR you can create a bootable USB stick. A (FREE) open source project called UNetbootin allows you to take a CD image (iso file) and create a bootable USB drive from it. You can check it out here: UNetbootin Homepage

Other options and alternatives

Other things we could do…

Disaster Recovery.

If you need to make any changes that require the GUI then undo the ISO Master changes, install the image to a VirtualBox VM and make the following edit in root recovery mode:

sudo nano /etc/gdm/gdm.conf-custom

Change AutomaticLoginEnable to false

Install(as opposed to liveCD):

At Boot,type in: install

and then press enter

Keep clicking OK (unless you want to install under a language other than English) until you get to the part where you have to enter a username and password.

Choose patron as user(entered twice) with password patron(entered twice), choose name of computer (ie Opac1) and choose Autologin.

On Reboot, press esc key and enter recovery mode.

Configure GRUB.

sudo nano /boot/grub/menu.lst

Reduce timeout to 1 second.

Comment out 'recovery mode' to prevent access to root console. Simply go all the way to the end of the file, and then put # in front of each line to remove, working your way back up. Keep in mind that you need to leave the top group of lines so the OS will boot correctly.

Disable Ctrl+Alt+Fn-keys.

sudo nano /etc/X11/xorg.conf

Paste the following to EOF

Section “ServerFlags

  Option    "DontVTSwitch"    "true"

EndSection

After doing this, to lock the computer down further, go into the Bios (usually F2 Key immediately after booting PC) and disable boot to anything other than the hard drive. Also be sure to add a supervisor password. Be sure to remove any hot keys for choosing boot device. You may also want to enable AC Revocery, which will boot up the computer when power is restored after a power failure.

References for this setup can be found at the following links

 
ubuntu_9.04_based_opac_kiosk.txt · Last modified: 2010/02/22 08:45 by chrishyde
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki