#!/bin/sh
#
# This script will configure a Gnome desktop with Metacity window manager to be
# secure for kiosk operations.  Run this script as the user account that you
# will be running the station under, such as 'goprint' or 'kiosk'..
#
# Note that newer versions of Gnome now have a custom.conf configuration file
# that should be edited instead of changing gdm.conf.  The Gnome configuration
# files are located in either /etc/X11/gdm or /etc/gdm, depending on the Linux
# distribution that you are using.  You can also use the gdmsetup utility to
# graphically configure automatic login and other aspects of the kiosk's startup.
# Just run 'su -c /usr/sbin/gdmsetup' or find the application named 'Login Window
# Preferences' on your Gnome menu.
#
# Copyright (c) 2008 GoPrint Systems, Inc.
#

# disable the splash screen because it doesn't go away sometimes - bug in Gnome 2 it seems
gconftool-2 --type=bool --set /apps/gnome-session/options/show_splash_screen false
# disable session auto-save so other apps won't get started by accident
gconftool-2 --type=bool --set /apps/gnome-session/options/auto_save_session false
gconftool-2 --type=bool --set /apps/gnome-session/options/logout_prompt true

# disable the features and mouse/key combinations that can cause problems
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_windows disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_left disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/cycle_windows disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_right disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/cycle_panels_backward disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_windows disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/run_command_window_screenshot disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_up disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/run_command_screenshot disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_down disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/panel_main_menu disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_panels disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/cycle_panels disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/show_desktop disabled
gconftool-2 --type=string --set /apps/metacity/global_keybindings/panel_run_dialog disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/maximize disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/close disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/move_to_workspace_left disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/move_to_workspace_up disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/minimize disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/move_to_workspace_right disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/activate_window_menu disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/begin_move disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/toggle_shaded disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/unmaximize disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/move_to_workspace_down disabled
gconftool-2 --type=string --set /apps/metacity/window_keybindings/begin_resize disabled
gconftool-2 --type=string --set /apps/metacity/general/mouse_button_modifier disabled
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 1

