#!/bin/sh
HOME=/tmp

# set the background
xsetroot -solid "#666699"

# configure/start minimal window manager
cat >> ~/.ratpoisonrc << EOF
escape C-M-S-F12
startup_message off
EOF
ratpoison &

# start nxclient with predefined session, sleep until it runs
while :; do
    opennx --session "/etc/ltsp/terminal.nxs"
    while ps -C nxssh >/dev/null; do sleep 1; done
done
