#!/bin/sh


# This gets run after ROX-Session is loaded and running as your session
# manager. ROX-Session will first try to load <Choices>/ROX-Session/Login,
# and only uses this if that is missing.
#
# This script should run any programs you want loaded when you log in and
# then exit. If you want to customise it, first copy it to
# ~/Choices/ROX-Session/Login and then edit that.
#
# See also the ROX-Session/RunROX script.
#
# $1 is the ROX-Session application directory.

if [ ! -n "$CHOICESPATH" ]; then
	CHOICESPATH=${HOME}/Choices:/usr/local/share/Choices:/usr/share/Choices
fi
IFS=":"

# Run any other stuff the user wants by searching all the
# Choices/ROX-Session/AutoStart directories...

for DIR in $CHOICESPATH; do
  if [ -n "$DIR" ]; then
    AS="$DIR/ROX-Session/AutoStart"
    for PROG in $AS/*; do
      if [ -d "$PROG" ]; then
    	  $PROG/AppRun &
      elif [ -x "$PROG" ]; then
	$PROG &
      fi
    done
  fi
done
