#!/bin/sh

if [ "`whoami`" = root ]; then
	/usr/X11R6/bin/xsetroot -cursor_name left_ptr -solid '#B20003'
	if [ ! -d /root/.gnome ] ; then
		mkdir -p /root/.gnome/
	fi
	if [ ! -e /root/.gnome/Background ] ; then
		cp /usr/share/mdk/gnome/root/Background /root/.gnome/Background
	fi
	if [ ! -e /root/.gnome/gnome-hint ] ; then 
		cp /usr/share/mdk/gnome/root/gnome-hint /root/.gnome/gnome-hint
	fi
else
	/usr/X11R6/bin/xsetroot -cursor_name left_ptr -solid "#21449C"
fi

if [ -x /usr/bin/galeon ]; then
  export BROWSER=`which galeon`
fi

if [ -x /usr/bin/nautilus-mozilla-content-view ]; then
  if [ -z "$BROWSER" ]; then
   export BROWSER=`which nautilus`
  fi
  export HELP_BROWSER=`which nautilus`
else
   export HELP_BROWSER=`which gnome-help-browser`
fi
exec /usr/bin/gnome-session
