#!/bin/sh -e

# Turn the screen saver functions off.
xset s off

if [ -f /etc/X11/Xresources ]; then
	# Strip directives which require cpp.
	sed -i '/[[:space:]]*#/d' /etc/X11/Xresources
	# Merge resources.
	xrdb -nocpp -merge /etc/X11/Xresources
fi

# Set fixed screen geometry.
xrandr -s 800x600 ||:
xrandr --output LVDS --mode 800x600 ||:
xrandr --dpi 80 ||:

# Stop services interfering to alterator-wizard.
service haldaemon stop
killall console-kit-daemon
service messagebus stop

exec alterator-wizard
