. /usr/lib/lsb/init-functions

if [ -e "/etc/inittab" ]; then
  sed -i "s/^id:[3-5]/id:5/" etc/inittab
  sed -i "s/lxdm/xdm/" etc/inittab
  log_success_msg2  "Init default set to 5 in the ${WARNING}/etc/inittab ${NORMAL}file"
  log_warning_msg "${WARNING} xdm replacing lxdm in /etc/inittab file${NORMAL}"
fi

log_warning_msg "${WARNING} You need to create your own .xinitrc file and adapt it to your needs ${NORMAL}"
echo "
==> EXAMPLE FOR XFCE4
cat > ~/.xinitrc << \"EOF\"
ck-launch-session dbus-launch --exit-with-session startxfce4
EOF
==> EXAMPLE FOR LXDE
cat > ~/.xinitrc << \"EOF\"
ck-launch-session `which startlxde`
EOF
chmod 700 ~/.xinitrc"
