#!/bin/sh

. /etc/thinstation.global

case $1 in
"--admin")
	nxclient --admin
;;
"--wizard")
	nxclient --wizard

	. /etc/nx.functions
	nx_menu

	if [ -n "$WMNAME" ] ; then
		. /etc/$WMNAME.functions
		wm_menu
	fi

	XTDPID=`pidof xtdesk`
	if [ -n "$XTDPID" ] ; then
		. /etc/xtdesk.functions
		xtdesk_icons
		kill $XTDPID
		xtdesk_icons
		xtdesk & >> $LOGFILE 2>&1
	fi
	;;
"")
	nxclient
;;
*)
	nxclient --session ~/.nx/config/$1.nxs
;;
esac

