#!/bin/sh export DISPLAY=:0 wname="LPLicenceManager" su -c "chown winer -R /home/winer" root if [ -f ~/configured1 ] then echo "[$wname]: Using previous configuration." else echo "[$wname]: First run configuration." mkdir ~/.vnc echo "{{ settings.vnc_password }}" | vncpasswd -f > ~/.vnc/passwd winetricks -q settings windowmanagerdecorated=n windowmanagermanaged=n touch ~/configured1 fi while : do echo "[$wname]: Starting." Xvfb -screen 0 800x600x16 & sleep 2 x0vncserver -display $DISPLAY -passwordfile ~/.vnc/passwd -rfbport 5900 & if [ -f ~/configured2 ] then echo "[$wname]: Not changing registry." else echo "[$wname]: Updating registry." wine regedit.exe /s 'c:\shortdate.reg' touch ~/configured2 fi wine 'c:\Data\LPLicenceManager\LPLicenceManager.exe' killall x0vncserver killall xvfb done echo "[$wname]: Exiting."