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

Revision 23865, 1.2 KB checked in by rbasch, 15 years ago (diff)
Add the debathena-kiosk package.
Line 
1#!/bin/sh
2
3# This is the xinit script for the kiosk user.
4
5libdir=/usr/lib/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=$libdir/r-kiosk.xpi
10
11# File with preferences to set in the firefox profile.
12prefs="$libdir/prefs.js"
13
14# User chrome (UI customizations) file.
15chrome="$libdir/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.
33mkdir -p "$profdir/extensions/$rkiosk_id"
34(cd "$profdir/extensions/$rkiosk_id" && unzip "$rkiosk_xpi") || exit 1
35cat <<EOF >> "$profdir/extensions.ini"
36[ExtensionDirs]
37Extension0=$profdir/extensions/$rkiosk_id
38EOF
39
40# Apply our preference settings and UI customizations.
41cat "$prefs" >> "$profdir/prefs.js" || exit 1
42cp "$chrome" "$profdir/chrome/userChrome.css" || exit 1
43
44# Launch firefox.
45firefox
46
47# Clean up.
48rm -rf .mozilla
Note: See TracBrowser for help on using the repository browser.