Reset Kiosk 0.2
Just released a new version with the ability to reuse existing homepage tab without reloading it. Homepage url will be matched from the beginning, so parameters on the page can change.
It should be available from addons.mozilla.org as soon as I figure out why it's not showing. Or maybe it just takes time to update the listing, who knows. It's been uploaded there anyway.
In the meantime, you can get it from here
Firefox plugin to reset browser
The old hack to reset browser based on xscreensaver screenblanking and a piece of perl to watch it was too ugly to use on the new installation. So here is simple firefox plugin which does basically the same thing without wasting resources. It simply loads a tab with your homepage and closes all other tabs after a period of inactivity. It also puts browser back to fullscreen mode (optional).
It has two configurable options in addon preferences. You can configure the inactivity timeout (in ms), and if the plugin should try to force fullscreen when reloading your homepage.
Use it in addition to "Full Fullscreen" addon which removes all window decorations etc from firefox and you have a perfect kiosk mode.
Get the plugin from addons.mozilla.org
LG 1730SF on Ubuntu 10.04 Lucid Lynx
I went and installed a new machine to control the lobby touchscreen. On the previous installation a few years ago I had to heavily patch kernel modules to support this touchscreen. Now it works almost out of the box. X.Org X Server 1.7.6, kernel 2.6.32-23-generic and evtouch 0.8.8.
The touchscreen is identified as follows in /proc/bus/input/devices, ubuntu loads usbtouchscreen kernel module for it automatically.
I: Bus=0003 Vendor=0403 Product=f9e9 Version=0100
N: Name="ITM Inc USB Touch Panel"
P: Phys=usb-0000:00:1d.1-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/input/input5
U: Uniq=
H: Handlers=mouse1 event5
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003
While browsing the net I found several different ways people have managed to get the touchscreen working on various versions of ubuntu, most of them are linked from rantakokko.net
Unfortunately none of those worked for Ubuntu 10.04. Seems like Ubuntu changes the way devices are set up for every release. It's still simple enough to get the touchscreen to work once you find out where the configuration is hidden on the current version and which configs are actually used. Xorg on 10.04 doesn't use HAL anymore, so adding itm touch correctly to policy files doesn't work. It doesn't have the regular /etc/X11/Xorg.conf either, also it doesn't support x11_options via udev. Ubuntu 10.04 Xorg uses udev and xorg.conf.d snippets. There is a problem with evtouch snippet though, it doesn't have MatchDevicePath option, so when Xorg detects evtouch device it tries to add it to all the handlers, it goes ok with the /dev/input/event*, but crashes on /dev/input/mouse*
(II) config/udev: Adding input device ITM Inc USB Touch Panel (/dev/input/mouse1)
.
.
(EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
Unable to query/initialize EVTouch hardware.
Solution:
Install evtouch
apt-get install xserver-xorg-input-evtouch
Fix xorg.conf.d snippet at /usr/lib/X11/xorg.conf.d/10-evtouch.conf
Section "InputClass"
Identifier "touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evtouch"
Option "MinX" "295"
Option "MaxX" "3815"
Option "MinY" "200"
Option "MaxY" "3948"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "50"
Option "SwapX" "1"
Option "SendCoreEvents" "on"
Option "Rotate" "ccw"
Option "ReportingMode" "raw"
EndSection
In addition to the MatchDevicePath directive you can put all the usual evtouch configuration here as well. After these changes, Xorg.0.log should look like this.
(II) LoadModule: "evtouch"
(II) Loading /usr/lib/xorg/modules/input/evtouch_drv.so
(II) Module evtouch: vendor="Kenan Esau"
compiled for 1.7.6, module version = 0.8.8
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 7.0
State: S_UNTOUCHED Action: No Action Button: 0
State: S_TOUCHED Action: No Action Button: 0
State: S_LONGTOUCHED Action: down Button: 1
State: S_MOVING Action: No Action Button: 0
State: S_MAYBETAPPED Action: click Button: 1
State: S_ONEANDAHALFTAP Action: down Button: 3
(**) Option "MinX" "295"
(**) Option "MaxX" "3815"
(**) Option "MinY" "200"
(**) Option "MaxY" "3948"
(**) Option "Emulate3Buttons" "true"
(**) Option "Emulate3Timeout" "50"
(**) Option "SwapX" "1"
(**) Option "SendCoreEvents" "on"
(**) EVTouch TouchScreen: always reports core events
(II) XINPUT: Adding extended input device "EVTouch TouchScreen" (type: TOUCHSCREEN)
(**) Option "Device" "/dev/input/event5"
(II) EVTouch TouchScreen: Found absolute axes
(II) config/udev: Adding input device ITM Inc USB Touch Panel (/dev/input/mouse1)
(II) No input driver/identifier specified (ignoring)
If you have touch panel rotated some other way, play with SwapX, SwapY and Rotate.
"HTPC"
Here's what the Audio & Video part of the house looks like now
There are 3 places in the house where we listen to music, theatre room, living room and sauna. Living room has it's own equipment. Theatre equipment handles the sauna speakers as well. iTunes on an iMac is used to store and organize audio collection, and also play music in theatre room.
Sauna & Living Room use the iTunes collection via MPD (Music player daemon) Wall mounted touchscreen is used to control MPD which plays the music.
Living room has diskless ubuntu HTPC which boots from gentoo server, in addition to MPD, it also runs Xine which is used as frontend for VDR, streaming SDTV content from the server. Everything in living room and then some can be controlled with Harmony 525 remote control.
Theatre room playback is handled by Plex running on the iMac. Plex used to organize video library.
So, this HTPC project has grown a bit.
Basically the whole house is now a big tech toy (including home automation with computer controlled lights, wall sockets, motion sensors, smoke detectors, temperature sensors, door sensors, etc, but that's another story, you can read more about it in the other blog. Only in Finnish though for now, sorry.)
Diskless setup details
Someone from Slashdot googled this site and didn't find enough details on my setup, so here it goes.
The client part used to be just a regular ubuntu install on a local hdd, to make it boot over NFS all that had to be done on client side was to create a new initrd and copy the hdd contents to server.
Edit /etc/mkinitramfs/initramfs.conf
# # BOOT: [ local | nfs ] # # local - Boot off of local media (harddrive, USB stick). # # nfs - Boot using an NFS drive as the root of the drive. # BOOT=nfs
Create new initrd image
mkinitramfs -o /tmp/your-shiny-initrd
That's it, remove the hdd and copy the contents to server. Change boot setting in BIOS to try to PXE boot.
On the server side you need to have nfs server, dhcp server, tftp server and pxelinux package.
NFS config is really just adding one line to /etc/exports
/tftproot/diskless *(rw,no_root_squash,async)
(replace * with proper mask if you want to be careful
)
Relevant parts of DHCP server config, let's play that the server ip is 10.10.10.1 and client 10.10.10.2
option pxe-menu code 150 = text;
allow booting;
allow bootp;
subnet 10.10.10.0 netmask 255.255.255.0 {
host diskless {
hardware ethernet 00:40:63:E6:61:71;
fixed-address 10.10.10.2;
filename "pxelinux.0";
next-server 10.10.10.1;
}
}
TFTP config for gentoo is in /etc/conf.d/in.tftpd
# /etc/init.d/in.tftpd
# Path to server files from
INTFTPD_PATH="/tftproot"
# For more options, see tftpd(8)
INTFTPD_OPTS="-l -p -c -s ${INTFTPD_PATH} -vvvvvv"
Now, I copied the contents of the ubuntu hdd to /tftproot/diskless/, copied ubuntu kernel and the just generated initrd to /tftproot/ and copied pxelinux.0 to /tftproot/ . Next step was to create pxelinux config it should be located in /tfproot/pxelinux.cfg/ (more info on the naming of files etc in that directory can be found here.
My diskless client config (/tftproot/pxelinux.cfg/01-00-40-63-e6-61-71)
timeout 10
prompt 1
default Ubuntu
label Ubuntu
kernel ubu-vmlinuz
append root=/dev/nfs initrd=your-shiny-initrd nfsroot=10.10.10.1:/tftproot/diskless ip=dhcp rw nosplash
All set. Power on your diskless machine. You should see something like this in /var/log/messages
Nov 16 04:56:22 kippo in.tftpd[3760]: RRQ from 10.10.10.3 filename pxelinux.0 Nov 16 04:56:22 kippo in.tftpd[3760]: tftp: client does not accept options Nov 16 04:56:22 kippo in.tftpd[3761]: RRQ from 10.10.10.3 filename pxelinux.0 Nov 16 04:56:22 kippo in.tftpd[3762]: RRQ from 10.10.10.3 filename pxelinux.cfg/01-00-40-63-e6-61-71 Nov 16 04:56:23 kippo in.tftpd[3763]: RRQ from 10.10.10.3 filename ubu-vmlinuz Nov 16 04:56:24 kippo in.tftpd[3764]: RRQ from 10.10.10.3 filename ubu-initrd Nov 16 04:56:37 kippo rpc.mountd: authenticated mount request from diskless:864 for /tftproot/diskless (/tftproot/diskless)
Now, all that is left is to install VDR & plugins on the server and xineliboutput frontend to the client machine. On gentoo, just emerge what you need, here's my /etc/portage/package.keywords which also pretty much shows what plugins I have installed on vdr
media-plugins/vdr-xineliboutput ~x86 media-plugins/vdr-epgsearch ~x86 media-plugins/vdr-subtitles ~x86 media-plugins/vdr-femon ~x86 media-plugins/vdr-burn ~x86 net-www/vdradmin-am ~x86 media-tv/xmltv ~x86
On the client you need only xine & xineliboutput installed, then you can use vdf-sxfe/fbfe (comes with xineliboutput) or just plain xine. My client in VIA EPIA board, and it has unichrome pro chipset (mpeg2 hw acceleration using xxmc), so the command line to get the TV to show
xine "xvdr:udp://10.10.10.1#nocache;demux:mpeg_block" --fullscreen --hide-gui --video-driver xxmc --aspect-ratio 4:3 --post vdr -Dtvtime:method=use_vo_driver
or
vdr-sxfe xvdr://10.10.10.1 --fullscreen --video=xxmc --audio=alsa:iec958 --aspect 4:3 --post tvtime:method=use_vo_driver
(note aspect ratio 4:3 is good for 16:9 CRT TV, logical eh)
And most like you also want to control everything with remote control so you need to install lirc and configure it properly. I won't go into details, but basically you need lirc installed on both client and server, on the client tell lirc to be on listen mode(--listen), and on server tell lirc to connect to the client(--connect=10.10.10.2).
:: Next >>
