#!/bin/sh
# set the background
/usr/bin/xsetroot -solid black

# set some variables
export NXDIR=/usr/NX
export HOME=/tmp

# start the window manager
openbox &

# start nxclient
while true; do
    # start nx client with predefined session
    $NXDIR/bin/nxclient --session "/etc/X11/terminal.nxs"
    # sleep until nxclient(nxssh) is running
    while (ps -C nxssh > /dev/null); do
        sleep 1
    done
done

