From 3b22387cb967f6cc0bb5b818bef728a03520ef49 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 22 Mar 2016 17:56:15 +0100 Subject: Complete rework of the Internet Kiosk Browser startup. --- VERSION | 2 +- debian/changelog | 7 ++ debian/compat | 2 +- debian/control | 23 ++-- debian/copyright | 32 ++--- debian/internet-kiosk.default | 26 ++++ debian/internet-kiosk.dirs | 2 +- debian/internet-kiosk.examples | 1 - debian/internet-kiosk.init | 95 -------------- debian/internet-kiosk.install | 8 +- debian/internet-kiosk.manpages | 2 +- debian/internet-kiosk.postinst | 42 +++++++ debian/internet-kiosk.prerm | 44 +++++++ debian/source/format | 2 +- internet-kiosk-management/share/etc/ik_init | 33 ----- internet-kiosk-management/share/etc/ik_start | 51 -------- internet-kiosk-management/share/etc/ik_xmodmap | 52 -------- .../share/etc/ssh-root/authorized_keys | 0 .../share/etc/ssh-user/authorized_keys | 0 internet-kiosk/bin/internet-kiosk-browser | 122 ++++++++++++++++++ .../etc/firefox-esr/pref/internet-kiosk.js | 49 ++++++++ .../etc/iceweasel/pref/internet-kiosk.js | 49 -------- .../etc/internet-kiosk/README.unconfigured | 33 ----- internet-kiosk/etc/internet-kiosk/ik_xmodmap | 52 ++++++++ .../etc/internet-kiosk/ssh-user/authorized_keys | 0 internet-kiosk/man/internet-kiosk-browser.1 | 28 +++++ internet-kiosk/man/internet-kiosk-daemon.8 | 25 ---- internet-kiosk/sbin/internet-kiosk-daemon | 138 --------------------- .../share/xsessions/internet-kiosk.desktop | 8 ++ 29 files changed, 408 insertions(+), 520 deletions(-) create mode 100644 debian/internet-kiosk.default delete mode 100644 debian/internet-kiosk.examples delete mode 100644 debian/internet-kiosk.init create mode 100755 debian/internet-kiosk.postinst create mode 100755 debian/internet-kiosk.prerm delete mode 100755 internet-kiosk-management/share/etc/ik_init delete mode 100755 internet-kiosk-management/share/etc/ik_start delete mode 100644 internet-kiosk-management/share/etc/ik_xmodmap delete mode 100644 internet-kiosk-management/share/etc/ssh-root/authorized_keys delete mode 100644 internet-kiosk-management/share/etc/ssh-user/authorized_keys create mode 100755 internet-kiosk/bin/internet-kiosk-browser create mode 100644 internet-kiosk/etc/firefox-esr/pref/internet-kiosk.js delete mode 100644 internet-kiosk/etc/iceweasel/pref/internet-kiosk.js delete mode 100644 internet-kiosk/etc/internet-kiosk/README.unconfigured create mode 100644 internet-kiosk/etc/internet-kiosk/ik_xmodmap create mode 100644 internet-kiosk/etc/internet-kiosk/ssh-user/authorized_keys create mode 100644 internet-kiosk/man/internet-kiosk-browser.1 delete mode 100644 internet-kiosk/man/internet-kiosk-daemon.8 delete mode 100755 internet-kiosk/sbin/internet-kiosk-daemon create mode 100644 internet-kiosk/share/xsessions/internet-kiosk.desktop diff --git a/VERSION b/VERSION index 4e379d2..6e8bf73 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.2 +0.1.0 diff --git a/debian/changelog b/debian/changelog index 16a9c45..8578354 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +internet-kiosk (0.1.0~edu1) UNRELEASED; urgency=medium + + * New upstream version (0.1.0): + - Complete rework of the Internet Kiosk Browser startup. + + -- Mike Gabriel Tue, 22 Mar 2016 17:19:08 +0100 + internet-kiosk (0.0.2-0~edu1) unstable; urgency=low * New upstream version (0.0.2): diff --git a/debian/compat b/debian/compat index 7f8f011..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index b53b346..0d716fc 100644 --- a/debian/control +++ b/debian/control @@ -5,12 +5,12 @@ Maintainer: Debian Edu Packaging Team Build-Depends: - debhelper (>= 7.0.50~), + debhelper (>= 9), cdbs, -Standards-Version: 3.9.3 +Standards-Version: 3.9.7 Homepage: http://wiki.it-zukunft-schule.de -Vcs-Git: git://code.it-zukunft-schule.de/upstream/internet-kiosk.git -Vcs-Browser: http://code.it-zukunft-schule.de/gitweb?p=upstream/internet-kiosk.git;a=summary +Vcs-Git: https://code.it-zukunft-schule.de/cgit/internet-kiosk.git +Vcs-Browser: https://code.it-zukunft-schule.de/cgit/internet-kiosk/ Package: internet-kiosk-management Architecture: all @@ -47,22 +47,24 @@ Depends: ${misc:Depends}, ${perl:Depends}, psmisc, - iceweasel | firefox, + firefox-esr | iceweasel, matchbox-window-manager, - xul-ext-fullscreen, xinit, - x11-xserver-utils, locales, + nodm, + pulseaudio-utils, Recommends: + pulseaudio, + unclutter, + x11-xserver-utils, +Suggests: vim, mc, acpid, memtest86, memtest86+, - plymouth, openssh-server, - unclutter, -Suggests: + plymouth, plymouth-themes-all, Description: Internet Kiosk daemon Internet Kiosk is a simple tool that provides an internet-cafe-like @@ -81,3 +83,4 @@ Description: Internet Kiosk daemon Either install this package on top of a minimal system installation or let the Internet Kiosk management scripts install it within the diskless Internet Kiosk chroot environment. + diff --git a/debian/copyright b/debian/copyright index 58a3b20..b230fc5 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,34 +1,18 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: internet-kiosk Upstream-Contact: Mike Gabriel -Source: http://code.it-zukunft-schule.de/gitweb?p=upstream/internet-kiosk.git;a=summary +Source: https://code.it-zukunft-schule.de/cgit/internet-kiosk/ -Files: * -Copyright: 2012, Mike Gabriel +Files: internet-kiosk/* + internet-kiosk-management/* + VERSION +Copyright: 2012-2016, Mike Gabriel License: GPL-2+ - This program is free software; you can redistribute it - and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later - version. - . - This program is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the GNU General Public License for more - details. - . - You should have received a copy of the GNU General Public - License along with this package; if not, write to the Free - Software Foundation, Inc., 51 Franklin St, Fifth Floor, - Boston, MA 02110-1301 USA - . - On Debian systems, the full text of the GNU General Public - License version 2 can be found in the file - `/usr/share/common-licenses/GPL-2'. Files: debian/* -Copyright: 2012, Mike Gabriel +Copyright: 2012-2016, Mike Gabriel +License: GPL-2+ + License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/debian/internet-kiosk.default b/debian/internet-kiosk.default new file mode 100644 index 0000000..3d9e307 --- /dev/null +++ b/debian/internet-kiosk.default @@ -0,0 +1,26 @@ + +# Internet Kiosk Browser: Wrap around Firefox-ESR and turn into into a +# Kiosk mode browser + +# There can be master terminals and slave terminals. +# All terminal not listed here are slave terminals... +MASTER_TERMINALS="($hostname -f)" + +# these terminals can have different startup URLs +START_URL_MASTERS="http://wiki.debian.org" +START_URL_SLAVES="http://wiki.it-zukunft-schule.de" + +# launch pulseaudio daemon if not already running +WITH_PULSEAUDIO="yes" + +# hide idle mouse pointer +HIDE_IDLE_POINTER="yes" + +# enforce fixed resolution for displays +# MASTER_RESOLUTION="1920x1080" +# SLAVE_RESOLUTION="1920x1080" +MASTER_RESOLUTION= +SLAVE_RESOLUTION= + +# screensaver settings, see "man 1 xset" for possible options +SCREENSAVER_SETTINGS="" diff --git a/debian/internet-kiosk.dirs b/debian/internet-kiosk.dirs index 67e7c90..cb2ea62 100644 --- a/debian/internet-kiosk.dirs +++ b/debian/internet-kiosk.dirs @@ -1,2 +1,2 @@ -usr/sbin/ +usr/bin/ etc/internet-kiosk diff --git a/debian/internet-kiosk.examples b/debian/internet-kiosk.examples deleted file mode 100644 index 39c99d2..0000000 --- a/debian/internet-kiosk.examples +++ /dev/null @@ -1 +0,0 @@ -internet-kiosk-management/share/etc diff --git a/debian/internet-kiosk.init b/debian/internet-kiosk.init deleted file mode 100644 index 2867109..0000000 --- a/debian/internet-kiosk.init +++ /dev/null @@ -1,95 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2010-2012 by Debian Edu project, http://wiki.debian.org/DebianEdu -# Mike Gabriel - -# Internet Kiosk is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Internet Kiosk is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -### BEGIN INIT INFO -# Provides: internet-kiosk-daemon -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start and stop the Internet Kiosk daemon -### END INIT INFO - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -export HOSTNAME -DAEMON=/usr/sbin/internet-kiosk-daemon -NAME="internet-kiosk" -DESC="Internet Kiosk Daemon" - -test -x $DAEMON || exit 0 -if [ ! -x /etc/internet-kiosk/ik_init ] || [ ! -x /etc/internet-kiosk/ik_start ]; then - echo "The Internet Kiosk system will not start as it is not configured, yet." - exit 0 -fi - -# pre-init Internet Kiosk Diskless Terminal through init script... -test -x /etc/internet-kiosk/ik_init && . /etc/internet-kiosk/ik_init - -set -e - -case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid && echo "$NAME." || echo "not running" - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart" except that it does nothing if the - # daemon isn't already running. - # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid \ - && $0 restart \ - || exit 0 - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/internet-kiosk.install b/debian/internet-kiosk.install index 2327f05..b63b3c6 100644 --- a/debian/internet-kiosk.install +++ b/debian/internet-kiosk.install @@ -1,4 +1,4 @@ -internet-kiosk/etc/internet-kiosk etc/ -internet-kiosk/etc/iceweasel etc/ -internet-kiosk/sbin/internet-kiosk-daemon usr/sbin/ - +internet-kiosk/etc/firefox-esr etc/ +internet-kiosk/etc/internet-kiosk etc/ +internet-kiosk/bin/internet-kiosk-browser usr/bin/ +internet-kiosk/share/* usr/share/ diff --git a/debian/internet-kiosk.manpages b/debian/internet-kiosk.manpages index d324701..fca121c 100644 --- a/debian/internet-kiosk.manpages +++ b/debian/internet-kiosk.manpages @@ -1 +1 @@ -internet-kiosk/man/internet-kiosk-daemon.8 \ No newline at end of file +internet-kiosk/man/internet-kiosk-browser.1 \ No newline at end of file diff --git a/debian/internet-kiosk.postinst b/debian/internet-kiosk.postinst new file mode 100755 index 0000000..9378ca9 --- /dev/null +++ b/debian/internet-kiosk.postinst @@ -0,0 +1,42 @@ +#!/bin/sh +# postinst script for internet-kiosk +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + update-alternatives --install /usr/bin/x-session-manager \ + x-session-manager /usr/bin/internet-kiosk-browser 20 \ + --slave /usr/share/man/man1/x-session-manager.1.gz \ + x-session-manager.1.gz /usr/share/man/man1/internet-kiosk-browser.1.gz + + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/internet-kiosk.prerm b/debian/internet-kiosk.prerm new file mode 100755 index 0000000..17c8878 --- /dev/null +++ b/debian/internet-kiosk.prerm @@ -0,0 +1,44 @@ +#! /bin/sh + +# prerm script for internet-kiosk +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then + + update-alternatives --remove x-session-manager /usr/bin/internet-kiosk + +fi + + +case "$1" in + remove) + : + ;; + deconfigure|upgrade|failed-upgrade) + : + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/source/format b/debian/source/format index 9f67427..9f8e9b6 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (native) \ No newline at end of file +1.0 \ No newline at end of file diff --git a/internet-kiosk-management/share/etc/ik_init b/internet-kiosk-management/share/etc/ik_init deleted file mode 100755 index 559bbcf..0000000 --- a/internet-kiosk-management/share/etc/ik_init +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu -# Mike Gabriel - -# Internet Kiosk is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Internet Kiosk is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -# prepare account ,,internet-kiosk'' -mkdir -p /home/internet-kiosk -mkdir -p /home/internet-kiosk/.mozilla -mkdir -p /home/internet-kiosk/.ssh -test -f /etc/internet-kiosk/ssh-user/authorized_keys && cp /etc/internet-kiosk/ssh-user/authorized_keys /home/internet-kiosk/.ssh -chown internet-kiosk:internet-kiosk /home/internet-kiosk -Rf -chmod go-rwx /home/internet-kiosk -Rf - -# prepare account ,,root'' -mkdir -p /root/.ssh -test -f /etc/internet-kiosk/ssh-root/authorized_keys && cp /etc/internet-kiosk/ssh-root/authorized_keys /root/.ssh -chown root:root /root -Rf -chmod go-rwx /root -Rf diff --git a/internet-kiosk-management/share/etc/ik_start b/internet-kiosk-management/share/etc/ik_start deleted file mode 100755 index 31918a6..0000000 --- a/internet-kiosk-management/share/etc/ik_start +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu -# Mike Gabriel - -# Internet Kiosk is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Internet Kiosk is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -# there can be master terminals and slave terminals -MASTER_TERMINALS="vertretungsplan-04" - -# these terminals can have different startup URLs -START_URL_MASTERS="http://wiki.debian.org" -START_URL_SLAVES="http://www.ecosia.org" - -# enforce fixed resolution for displays -#MASTER_RESOLUTION="1024x768" -#SLAVE_RESOLUTION="1024x768" -MASTER_RESOLUTION= -SLAVE_RESOLUTION= - -HOST_NAME=$(hostname) -START_URL="$START_URL_SLAVES" -RESOLUTION="$SLAVE_RESOLUTION" -for master_terminal in $MASTER_TERMINALS; do - if [ "$HOST_NAME" == "$master_terminal" ]; then - START_URL="$START_URL_MASTERS" - #RESOLUTION="1024x768" - RESOLUTION="$MASTER_RESOLUTION" - break - fi -done - -if [ -n $RESOLUTION ]; then - xrandr -d :0 --output default --mode $RESOLUTION -fi - -#xset s -/usr/bin/iceweasel "$START_URL" & diff --git a/internet-kiosk-management/share/etc/ik_xmodmap b/internet-kiosk-management/share/etc/ik_xmodmap deleted file mode 100644 index 83f1d69..0000000 --- a/internet-kiosk-management/share/etc/ik_xmodmap +++ /dev/null @@ -1,52 +0,0 @@ -keycode 0x09 = 0x0000 -keycode 0x43 = 0x0000 -keycode 0x44 = 0x0000 -keycode 0x45 = 0x0000 -keycode 0x46 = 0x0000 -keycode 0x47 = 0x0000 -keycode 0x48 = 0x0000 -keycode 0x49 = 0x0000 -keycode 0x4A = 0x0000 -keycode 0x4B = 0x0000 -keycode 0x4C = 0x0000 -keycode 0x5F = 0x0000 -keycode 0x60 = 0x0000 -keycode 0x6F = 0x0000 -keycode 0x4E = 0x0000 -keycode 0x6E = 0x0000 -keycode 0x31 = 0x0000 -keycode 0x6A = 0x0000 -keycode 0x61 = 0x0000 -keycode 0x63 = 0x0000 -keycode 0x4D = 0x0000 -keycode 0x70 = 0x0000 -keycode 0x3F = 0x0000 -keycode 0x52 = 0x0000 -keycode 0x17 = 0x0000 -keycode 0x22 = 0x0000 -keycode 0x23 = 0x0000 -keycode 0x6B = 0x0000 -keycode 0x67 = 0x0000 -keycode 0x69 = 0x0000 -keycode 0x4F = 0x0000 -keycode 0x50 = 0x0000 -keycode 0x51 = 0x0000 -keycode 0x56 = 0x0000 -keycode 0x42 = 0x0000 -keycode 0x53 = 0x0000 -keycode 0x54 = 0x0000 -keycode 0x55 = 0x0000 -keycode 0x57 = 0x0000 -keycode 0x58 = 0x0000 -keycode 0x59 = 0x0000 -keycode 0x6C = 0x0000 -keycode 0x25 = 0x0000 -keycode 0x40 = 0x0000 -keycode 0x40 = 0x0000 -keycode 0x71 = 0x0000 -keycode 0x6D = 0x0000 -keycode 0x5A = 0x0000 -keycode 0x5B = 0x0000 -keycode 0x73 = 0x0000 -keycode 0x74 = 0x0000 -keycode 0x75 = 0x0000 diff --git a/internet-kiosk-management/share/etc/ssh-root/authorized_keys b/internet-kiosk-management/share/etc/ssh-root/authorized_keys deleted file mode 100644 index e69de29..0000000 diff --git a/internet-kiosk-management/share/etc/ssh-user/authorized_keys b/internet-kiosk-management/share/etc/ssh-user/authorized_keys deleted file mode 100644 index e69de29..0000000 diff --git a/internet-kiosk/bin/internet-kiosk-browser b/internet-kiosk/bin/internet-kiosk-browser new file mode 100755 index 0000000..a213cbc --- /dev/null +++ b/internet-kiosk/bin/internet-kiosk-browser @@ -0,0 +1,122 @@ +#!/bin/bash + +# Copyright (C) 2012-2016 by Debian Edu project, http://wiki.debian.org/DebianEdu +# Mike Gabriel + +# Internet Kiosk is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# Internet Kiosk is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +# dependencies: +# wmctrl +# matchbox-window-manager +# pulseaudio-utils +# +# recommendations: +# unclutter +# pulseaudio +# x11-xserver-utils + +START_URL="http://localhost" + +WITH_PULSEAUDIO="yes" +HIDE_IDLE_POINTER="yes" + +# There can be master terminals and slave terminals. +# All terminal not listed here are slave terminals... +MASTER_TERMINALS="($hostname -f)" + +# these terminals can have different startup URLs +START_URL_MASTERS="http://wiki.debian.org" +START_URL_SLAVES="http://wiki.it-zukunft-schule.de" + +# enforce fixed resolution for displays +# MASTER_RESOLUTION="1920x1080" +# SLAVE_RESOLUTION="1920x1080" +MASTER_RESOLUTION= +SLAVE_RESOLUTION= + +# launch pulseaudio daemon if not already running +WITH_PULSEAUDIO="yes" + +# hide idle mouse pointer +HIDE_IDLE_POINTER="yes" + +# default screensaver settings +SCREENSAVER_SETTINGS="" + +if [ -r /etc/default/internet-kiosk-browser ]; then + . /etc/default/internet-kiosk-browser +fi + +if [ -r $HOME/.internet-kiosk-browser ]; then + . $HOME/.internet-kiosk-browser +fi + +# provide pulseaudio support in the browser session, if not +# already available... +if ! pacmd stat 1>/dev/null 2>/dev/null; then + if [ "x$WITH_PULSEAUDIO" = "xyes" ]; then + if [ which pulseaudio 1>/dev/null ]; then + pulseaudio -D -n \ + -L 'module-udev-detect' + --exit-idle-time=65535 + fi + fi +fi + +# launch matchbox manager +if wmctrl -m 2>/dev/null; then + if which matchbox-window-manager 1>/dev/null; then + matchbox-window-manager & + fi +fi + +# use unclutter to hide idle mouse pointers +if [ "x$HIDE_IDLE_POINTER" = "xyes" ]; then + if which unclutter 1>/dev/null; then + unclutter & + fi +fi + +START_URL="$START_URL_SLAVES" +RESOLUTION="$SLAVE_RESOLUTION" + +for master_terminal in $MASTER_TERMINALS; do + if [ $(hostname -f) == "$master_terminal" ]; then + START_URL="$START_URL_MASTERS" + RESOLUTION="$MASTER_RESOLUTION" + break + fi +done + +if [ -n ${RESOLUTION} ]; then + if which xrandr 1>/dev/null; then + xrandr -d :0 --output default --mode ${RESOLUTION} + fi +fi + +# Set screensaver settings +if which xset 1>/dev/null; then + xset s "${SCREENSAVER_SETTINGS}" +fi + +# launch the web browser... +if which firefox 1>/dev/null; then + firefox $START_URL +elif which iceweasel 1>/dev/null; then + iceweasel $START_URL +fi + +exit 0 diff --git a/internet-kiosk/etc/firefox-esr/pref/internet-kiosk.js b/internet-kiosk/etc/firefox-esr/pref/internet-kiosk.js new file mode 100644 index 0000000..13f6fa5 --- /dev/null +++ b/internet-kiosk/etc/firefox-esr/pref/internet-kiosk.js @@ -0,0 +1,49 @@ +# Mozilla Preferences + +/* Do not edit this file. + * + * If you make changes to this file while the application is running, + * the changes will be overwritten when the application exits. + * + * To make a manual change to preferences, you can visit the URL about:config + * For more information, see http://www.mozilla.org/unix/customizing.html#prefs + */ + + +pref("browser.sessionstore.resume_session_once", false); +pref("extensions.installCache", "[{\"name\":\"app-system-share\",\"addons\":{\"fullscreen@technologyservicegroup.com\":{\"descriptor\":\"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/fullscreen@technologyservicegroup.com\",\"mtime\":1345554131000}}}]"); +pref("extensions.ui.dictionary.hidden", true); +pref("general.skins.selectedSkin", "fullscreen"); +pref("intl.charsetmenu.browser.cache", "UTF-8"); + +// Limit the disk cache, and disable it by default, to avoid users +// filling up their home directory with cache files. +pref("browser.cache.disk.enable", false); + +pref("browser.cache.disk.capacity", 5120); +// This need to point to a user specific file, can't use a common file for all users +//pref("browser.cache.disk.parent_directory", "/var/tmp"); + +// Printer Settings +pref("print.postscript.print_size", "A4"); + +// Enable spell checking in both single-line and multi-line fields +pref("layout.spellcheckDefault", 2); + +// Mailto settings +pref("network.protocol-handler.app.mailto", ""); + +// Disable malware detection to avoid heavy I/O during login. +// Should be disabled when BTS #? is fixed. +// http://www.debianhelp.org/node/14453 +// https://bugs.launchpad.net/firefox/+bug/215728 +// https://bugs.edge.launchpad.net/ubuntu/+source/firefox-3.0/+bug/229745 +pref("browser.safebrowsing.malware.enabled", false); +pref("browser.safebrowsing.enabled", false); + +// Enable automatic proxy setting Configure Proxy settings in iceweasel, +// using "Web Access Protocol Discovery" (WAPD). See +// /etc/debian-edu/www/wpad.dat for the WAPD files. The location of +// The WPAD file is handed out using DHCP and Iceweasel should look for +// http://wpad/wpad.dat automatically. +lockPref("network.proxy.type", 4); diff --git a/internet-kiosk/etc/iceweasel/pref/internet-kiosk.js b/internet-kiosk/etc/iceweasel/pref/internet-kiosk.js deleted file mode 100644 index 13f6fa5..0000000 --- a/internet-kiosk/etc/iceweasel/pref/internet-kiosk.js +++ /dev/null @@ -1,49 +0,0 @@ -# Mozilla Preferences - -/* Do not edit this file. - * - * If you make changes to this file while the application is running, - * the changes will be overwritten when the application exits. - * - * To make a manual change to preferences, you can visit the URL about:config - * For more information, see http://www.mozilla.org/unix/customizing.html#prefs - */ - - -pref("browser.sessionstore.resume_session_once", false); -pref("extensions.installCache", "[{\"name\":\"app-system-share\",\"addons\":{\"fullscreen@technologyservicegroup.com\":{\"descriptor\":\"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/fullscreen@technologyservicegroup.com\",\"mtime\":1345554131000}}}]"); -pref("extensions.ui.dictionary.hidden", true); -pref("general.skins.selectedSkin", "fullscreen"); -pref("intl.charsetmenu.browser.cache", "UTF-8"); - -// Limit the disk cache, and disable it by default, to avoid users -// filling up their home directory with cache files. -pref("browser.cache.disk.enable", false); - -pref("browser.cache.disk.capacity", 5120); -// This need to point to a user specific file, can't use a common file for all users -//pref("browser.cache.disk.parent_directory", "/var/tmp"); - -// Printer Settings -pref("print.postscript.print_size", "A4"); - -// Enable spell checking in both single-line and multi-line fields -pref("layout.spellcheckDefault", 2); - -// Mailto settings -pref("network.protocol-handler.app.mailto", ""); - -// Disable malware detection to avoid heavy I/O during login. -// Should be disabled when BTS #? is fixed. -// http://www.debianhelp.org/node/14453 -// https://bugs.launchpad.net/firefox/+bug/215728 -// https://bugs.edge.launchpad.net/ubuntu/+source/firefox-3.0/+bug/229745 -pref("browser.safebrowsing.malware.enabled", false); -pref("browser.safebrowsing.enabled", false); - -// Enable automatic proxy setting Configure Proxy settings in iceweasel, -// using "Web Access Protocol Discovery" (WAPD). See -// /etc/debian-edu/www/wpad.dat for the WAPD files. The location of -// The WPAD file is handed out using DHCP and Iceweasel should look for -// http://wpad/wpad.dat automatically. -lockPref("network.proxy.type", 4); diff --git a/internet-kiosk/etc/internet-kiosk/README.unconfigured b/internet-kiosk/etc/internet-kiosk/README.unconfigured deleted file mode 100644 index 22c19e4..0000000 --- a/internet-kiosk/etc/internet-kiosk/README.unconfigured +++ /dev/null @@ -1,33 +0,0 @@ -Internet Kiosk -============== - -Internet Kiosk comes unconfigured ---------------------------------- - -Internet Kiosk can only be installed on minimal systems that do not -have an X server and/or window manager installed. - -Due to this Internet Kiosk is unconfigured after installation. This is the -default and wanted behaviour. - -Installation / Activation of Internet Kiosk -------------------------------------------- - -1. -Make sure, you have no local X server running on the system that -you install Internet Kiosk on. - -2. -To create a default configuration for Internet Kiosk, please run the -below copy command and modify the copied files to your needs: - - $ sudo cp -av /usr/share/doc/internet-kiosk/examples/etc/* /etc/internet-kiosk/ - -3. -After that, start the Internet Kiosk Daemon: - - $ sudo /etc/init.d/internet-kiosk start - - -light+love -Mike Gabriel diff --git a/internet-kiosk/etc/internet-kiosk/ik_xmodmap b/internet-kiosk/etc/internet-kiosk/ik_xmodmap new file mode 100644 index 0000000..83f1d69 --- /dev/null +++ b/internet-kiosk/etc/internet-kiosk/ik_xmodmap @@ -0,0 +1,52 @@ +keycode 0x09 = 0x0000 +keycode 0x43 = 0x0000 +keycode 0x44 = 0x0000 +keycode 0x45 = 0x0000 +keycode 0x46 = 0x0000 +keycode 0x47 = 0x0000 +keycode 0x48 = 0x0000 +keycode 0x49 = 0x0000 +keycode 0x4A = 0x0000 +keycode 0x4B = 0x0000 +keycode 0x4C = 0x0000 +keycode 0x5F = 0x0000 +keycode 0x60 = 0x0000 +keycode 0x6F = 0x0000 +keycode 0x4E = 0x0000 +keycode 0x6E = 0x0000 +keycode 0x31 = 0x0000 +keycode 0x6A = 0x0000 +keycode 0x61 = 0x0000 +keycode 0x63 = 0x0000 +keycode 0x4D = 0x0000 +keycode 0x70 = 0x0000 +keycode 0x3F = 0x0000 +keycode 0x52 = 0x0000 +keycode 0x17 = 0x0000 +keycode 0x22 = 0x0000 +keycode 0x23 = 0x0000 +keycode 0x6B = 0x0000 +keycode 0x67 = 0x0000 +keycode 0x69 = 0x0000 +keycode 0x4F = 0x0000 +keycode 0x50 = 0x0000 +keycode 0x51 = 0x0000 +keycode 0x56 = 0x0000 +keycode 0x42 = 0x0000 +keycode 0x53 = 0x0000 +keycode 0x54 = 0x0000 +keycode 0x55 = 0x0000 +keycode 0x57 = 0x0000 +keycode 0x58 = 0x0000 +keycode 0x59 = 0x0000 +keycode 0x6C = 0x0000 +keycode 0x25 = 0x0000 +keycode 0x40 = 0x0000 +keycode 0x40 = 0x0000 +keycode 0x71 = 0x0000 +keycode 0x6D = 0x0000 +keycode 0x5A = 0x0000 +keycode 0x5B = 0x0000 +keycode 0x73 = 0x0000 +keycode 0x74 = 0x0000 +keycode 0x75 = 0x0000 diff --git a/internet-kiosk/etc/internet-kiosk/ssh-user/authorized_keys b/internet-kiosk/etc/internet-kiosk/ssh-user/authorized_keys new file mode 100644 index 0000000..e69de29 diff --git a/internet-kiosk/man/internet-kiosk-browser.1 b/internet-kiosk/man/internet-kiosk-browser.1 new file mode 100644 index 0000000..223d6fe --- /dev/null +++ b/internet-kiosk/man/internet-kiosk-browser.1 @@ -0,0 +1,28 @@ +'\" -*- coding: utf-8 -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH internet-kiosk-browser 1 "22 Mar 2016" "Version 0.0.1.x" "Internet Kiosk Browser" +.SH NAME +internet-kiosk-browser \- Wrapper around Firefox ESR that turns a system into an Internet Kiosk Terminal +.SH SYNOPSIS +'nh +.fi +.ad l +\fBinternet-kiosk-browser\fR + +.SH DESCRIPTION +\fBinternet-kiosk-browser\fR is a wrapper around Firefox ESR that turns a system into an Internet Kiosk Terminal. +.PP +.SH OPTIONS +\fBinternet-kiosk-browser\fR passes all given options to Firefox ESR. If not options are given, options +are taken from /etc/default/internet-kiosk. +.PP +.SH SEE ALSO +/etc/default/internet-kiosk +.SH AUTHOR +This manual has been written by Mike Gabriel for the Debian Edu +project (http://wiki.debian.org/DebianEdu). diff --git a/internet-kiosk/man/internet-kiosk-daemon.8 b/internet-kiosk/man/internet-kiosk-daemon.8 deleted file mode 100644 index d97eefa..0000000 --- a/internet-kiosk/man/internet-kiosk-daemon.8 +++ /dev/null @@ -1,25 +0,0 @@ -'\" -*- coding: utf-8 -*- -.if \n(.g .ds T< \\FC -.if \n(.g .ds T> \\F[\n[.fam]] -.de URL -\\$2 \(la\\$1\(ra\\$3 -.. -.if \n(.g .mso www.tmac -.TH internet-kiosk-daemon 8 "17 August 2012" "Version 0.0.1.x" "Internet Kiosk" -.SH NAME -internet-kiosk-daemon \- Session Control Daemon running on Internet Kiosk Terminals -.SH SYNOPSIS -'nh -.fi -.ad l -\fBinternet-kiosk-daemon\fR - -.SH DESCRIPTION -\fBinternet-kiosk-daemon\fR is a session control daemon that runs on Internet Kiosk terminals. -.PP -.SH OPTIONS -\fBinternet-kiosk-daemon\fR has no known options. -.PP -.SH AUTHOR -This manual has been written by Mike Gabriel for the Debian Edu -project (http://wiki.debian.org/DebianEdu). diff --git a/internet-kiosk/sbin/internet-kiosk-daemon b/internet-kiosk/sbin/internet-kiosk-daemon deleted file mode 100755 index 1a7dac6..0000000 --- a/internet-kiosk/sbin/internet-kiosk-daemon +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/perl - -# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu -# Mike Gabriel - -# Internet Kiosk is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Internet Kiosk is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -use strict; -use IPC::Open3; - -sub catch_term -{ - system ("killall firefox-bin"); - system ("killall Xorg"); - system ("killall pulseaudio"); - unlink("/var/run/internet-kiosk.pid"); - exit; -} - -sub check_x -{ - my $x=`ps ax | grep X`; - if ( $x=~m/usr.bin.(Xorg|X)/ ) - { - return 1; - } - return 0; -} - -sub check_pulse -{ - my $pulse=`ps ax | grep pulse`; - - if ( $pulse=~m/pulseaudio/) - { - return 1; - } - return 0; -} - -sub check_browser -{ - my $browser=`ps ax | grep firef`; - - if ( $browser=~m/firefox-bin/) - { - return 1; - } - return 0; -} - -# make sure the .halt file is not present when we start this script -system("rm -f /home/internet-kiosk/.halt"); - -# start with a clean .mozilla config dir -system("rm -Rf /home/internet-kiosk/.mozilla"); - -# pre-load the thinclient initialization script -system("su internet-kiosk -c \". /etc/internet-kiosk/ik_init\""); - -# fork to background, check if forked state is ok... -my $pid = fork(); -if (not defined $pid) -{ - print "resources not avilable.\n"; -} -elsif ($pid != 0) -{ - open (F,">/var/run/internet-kiosk.pid"); - print F "$pid\n"; - close(F); -} -elsif ($pid == 0 ) -{ - - # silence this daemon script completely... - close(STDOUT); - close(STDERR); - - $SIG{TERM}=\&catch_term; - - while(sleep 1) - { - # test if shutdown is requested - if ( -e "/home/internet-kiosk/.halt") - { - # when used with plymouth, make sure we stay on the correct terminal - system("killall Xorg"); - system("shutdown -h now"); - } - # test if XServer is running, if not launch it... - if ( check_x() ==0 ) - { - system("/usr/bin/Xorg -br &"); - system("su - internet-kiosk -c \"DISPLAY=:0 matchbox-window-manager &\""); - system("su - internet-kiosk -c \"which unclutter 1>/dev/null && DISPLAY=:0 unclutter&\""); - } - - # test if pulseaudio is running, if not launch it... - if ( !check_pulse() ) - { - system("su - internet-kiosk -c \"DISPLAY=:0 pulseaudio -D -n \\ - -L 'module-native-protocol-tcp port=4713' \\ - -L 'module-esound-protocol-tcp port=16001' \\ - -L 'module-udev-detect' --exit-idle-time=65535\""); - } - - # test if web browser is running, if not launch it... - my $ic_pid = 0; - if ( !check_browser() ) - { - local *IN, *OUT, *ERR; - $ic_pid = eval { - open3( \*IN, \*OUT, \*ERR, "su - internet-kiosk -c 'DISPLAY=:0 bash -c \"/etc/internet-kiosk/ik_start &\"'"); - }; - ## give the web browser some time to start - sleep(3); - ## wait for browser to finish - if ( check_browser() ) - { - waitpid( $ic_pid, 0 ); - } - } - } -} diff --git a/internet-kiosk/share/xsessions/internet-kiosk.desktop b/internet-kiosk/share/xsessions/internet-kiosk.desktop new file mode 100644 index 0000000..43cbeaf --- /dev/null +++ b/internet-kiosk/share/xsessions/internet-kiosk.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Internet Kiosk Session +Comment=Firefox Browser in Kiosk Mode +Exec=internet-kiosk-browser +TryExec=internet-kiosk-browser +Icon=iceweasel +Type=Application +Keywords=internet;web;browser;kiosk;mode; -- cgit v1.2.3