#!/bin/sh

if [ -x /usr/bin/nautilus ]; then
  /usr/bin/nautilus -n $*
  gconftool -g /apps/nautilus/preferences/show_desktop 2>/dev/null | grep -q true
  SHOW_DESKTOP=$?
  if [ ! -f $HOME/.nautilus/first-time-flag -o $SHOW_DESKTOP ]; then
    if [ -x /usr/bin/gmc ]; then
      /usr/bin/gmc --nowindows $*
    else
      echo Nautilus has not been activated to display icons and gmc is not
      echo installed. There will be no icons in GNOME desktop !!!
    fi
  fi
else
   if [ -x /usr/bin/gmc ]; then
     /usr/bin/gmc --nowindows $*
    RETVAL=$?
    exit $RETVAL
   fi
fi
