#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Change your keymap:
xmodmap "/root/.Xmodmap"

DEVICE=`xinput -list | grep Elo | cut -d"=" -f2 | awk '{ print $1 }'`
xrandr --output LVDS1 --mode 1024x768 --scale 0.78x0.78 --pos 0x0 --panning 800x600 --rotate normal

# x11vnc
/usr/bin/x11vnc -notruecolor -norc -forever -scale 800x600 -geometry 800x600 -bg -display :0

##COORDINATES##

# run pos
/opt/pos/common/bin/run_pos.sh &

if [ ! -e "/tmp/restarted.txt" ]; then
  sleep 3
  touch /tmp/restarted.txt
  killall Xorg
fi

