From c980c15343b002e26792ceb8a4e946e9830ef257 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 21 Aug 2012 17:45:11 +0200 Subject: improve browser startup, provide homepage in ik_start, remove default mozilla profile as it is not needed --- debian/control | 1 + internet-kiosk-management/share/ik_start | 4 +- .../profile/internet-kiosk.default/.placeholder | 0 .../share/profile/profiles.ini | 9 ---- .../etc/iceweasel/pref/internet-kiosk.js | 49 +++++++++++++++++++++ internet-kiosk/etc/iceweasel/pref/prefs.js | 51 ---------------------- internet-kiosk/sbin/internet-kiosk-daemon | 4 ++ 7 files changed, 57 insertions(+), 61 deletions(-) delete mode 100644 internet-kiosk-management/share/profile/internet-kiosk.default/.placeholder delete mode 100644 internet-kiosk-management/share/profile/profiles.ini create mode 100644 internet-kiosk/etc/iceweasel/pref/internet-kiosk.js delete mode 100644 internet-kiosk/etc/iceweasel/pref/prefs.js diff --git a/debian/control b/debian/control index 9d4828d..5e8bcf3 100644 --- a/debian/control +++ b/debian/control @@ -48,6 +48,7 @@ Depends: ${perl:Depends}, psmisc, iceweasel | firefox, + matchbox-window-manager, xul-ext-fullscreen, xinit, locales, diff --git a/internet-kiosk-management/share/ik_start b/internet-kiosk-management/share/ik_start index 70b06b8..cad97cd 100755 --- a/internet-kiosk-management/share/ik_start +++ b/internet-kiosk-management/share/ik_start @@ -18,5 +18,7 @@ # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -/usr/bin/iceweasel & +START_URL="http://wiki.debian.org" + +/usr/bin/iceweasel "$START_URL" & diff --git a/internet-kiosk-management/share/profile/internet-kiosk.default/.placeholder b/internet-kiosk-management/share/profile/internet-kiosk.default/.placeholder deleted file mode 100644 index e69de29..0000000 diff --git a/internet-kiosk-management/share/profile/profiles.ini b/internet-kiosk-management/share/profile/profiles.ini deleted file mode 100644 index 0f5a3b0..0000000 --- a/internet-kiosk-management/share/profile/profiles.ini +++ /dev/null @@ -1,9 +0,0 @@ -[General] -StartWithProfile=1 - -[Profile0] -Name=internet-kiosk -IsRelative=1 -Path=internet-kiosk.default - - diff --git a/internet-kiosk/etc/iceweasel/pref/internet-kiosk.js b/internet-kiosk/etc/iceweasel/pref/internet-kiosk.js new file mode 100644 index 0000000..13f6fa5 --- /dev/null +++ b/internet-kiosk/etc/iceweasel/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/prefs.js b/internet-kiosk/etc/iceweasel/pref/prefs.js deleted file mode 100644 index f2e6537..0000000 --- a/internet-kiosk/etc/iceweasel/pref/prefs.js +++ /dev/null @@ -1,51 +0,0 @@ -# Mozilla User 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"); -pref("browser.startup.page", 1); -user_pref("browser.startup.homepage","http://wiki.it-zukunft-schule.de"); - -// 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); \ No newline at end of file diff --git a/internet-kiosk/sbin/internet-kiosk-daemon b/internet-kiosk/sbin/internet-kiosk-daemon index a6a9c14..44b7c2e 100755 --- a/internet-kiosk/sbin/internet-kiosk-daemon +++ b/internet-kiosk/sbin/internet-kiosk-daemon @@ -65,6 +65,9 @@ sub check_browser # 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\""); @@ -102,6 +105,7 @@ elsif ($pid == 0 ) if ( check_x() ==0 ) { system("/usr/bin/Xorg -br &"); + system("DISPAY=:0 matchbox-window-manager &"); } # test if pulseaudio is running, if not launch it... -- cgit v1.2.3