#!/bin/bash
DESKTOP=default

# read the user (~/.i18n) or system-wide (/etc/sysconfig/i18n) i18n settings
. /etc/profile.d/10lang.sh

# Allow local users to run X applications, irregardless of system hostname
if [ -x /usr/bin/xhost ] && [ -x /bin/id ]; then
    xhost +si:localuser:`id -un` >& /dev/null
fi

xsetroot -cursor_name watch

userresources=$HOME/.Xresources 
userresources2=$HOME/.Xdefaults
sysresources=/etc/X11/Xresources 

export XAUTHORITY=$HOME/.Xauthority

# merge in defaults and keymaps 
if [ -f $sysresources ]; then 
    xrdb -nocpp -merge $sysresources 
fi 
 
if [ -f $userresources ]; then 
    xrdb -merge $userresources 
fi 

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


#XDG_CURRENT_DESKTOP=$(/usr/sbin/chksession -F)

eval exec "ck-launch-session dbus-launch --exit-with-session $*"
