source: trunk/debathena/debathena/kiosk/xinitrc @ 24578

Revision 24578, 1.3 KB checked in by rbasch, 14 years ago (diff)
In kiosk: * Add session management support via the D-Bus interface to the gdm launcher, so it terminates upon the end of the gdm session. (Trac: #548) * Make r-kiosk work in Firefox 3.6, by supplying a chrome.manifest and disabling the version-specific compatibility check. (Trac: #571)
Line 
1#!/bin/sh
2
3# This is the xinit script for the kiosk user.
4
5datadir=/usr/share/debathena-kiosk
6
7# The rkiosk extension's unique ID, and the location of its xpi file.
8rkiosk_id="{4D498D0A-05AD-4fdb-97B5-8A0AABC1FC5B}"
9rkiosk_xpi=$datadir/r-kiosk.xpi
10
11# File with preferences to set in the firefox profile.
12prefs="$datadir/prefs.js"
13
14# User chrome (UI customizations) file.
15chrome="$datadir/userChrome.css"
16
17cd || exit 1
18
19exec > xinit.log 2>&1
20
21XAUTHORITY=$HOME/.Xauthority
22export XAUTHORITY
23
24# Run a window manager so that firefox fullscreen mode works.
25metacity --sm-disable &
26
27# Create a new firefox profile.
28rm -rf .mozilla
29firefox -CreateProfile default > /dev/null || exit 1
30profdir=$(find .mozilla/firefox -type d -name \*.default)
31
32# Add the rkiosk extension.
33rkiosk_dir="$profdir/extensions/$rkiosk_id"
34mkdir -p "$rkiosk_dir"
35(cd "$rkiosk_dir" && unzip "$rkiosk_xpi") || exit 1
36cat <<EOF >> "$profdir/extensions.ini"
37[ExtensionDirs]
38Extension0=$rkiosk_dir
39EOF
40
41# Firefox 3.6+ requires a chrome.manifest for the extension.
42if [ ! -e "$rkiosk_dir/chrome.manifest" ]; then
43  cp "$datadir/chrome.manifest.r-kiosk" "$rkiosk_dir/chrome.manifest" || exit 1
44fi
45
46# Apply our preference settings and UI customizations.
47cat "$prefs" >> "$profdir/prefs.js" || exit 1
48cp "$chrome" "$profdir/chrome/userChrome.css" || exit 1
49
50# Launch firefox.
51firefox
52
53# Clean up.
54rm -rf .mozilla
Note: See TracBrowser for help on using the repository browser.