#!/bin/bash

[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile

sysresources=$HOME/.Xresources

# merge in

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  eval $(dbus-launch --sh-syntax --exit-with-session)
  exec ck-launch-session dbus-launch --exit-with-session icewm-session
else
  exec dbus-launch --exit-with-session icewm-session
fi
