#!/bin/sh
##################################################################################
#
# Twobob redefined starter for a rgbpaint application.
#
##################################################################################

#setup helpful variables...
		APP=rgbpaint

		EXTENSION=/mnt/us/extensions

export	LD_LIBRARY_PATH=${EXTENSION}/pente/usr/lib:/usr/lib:/lib	

#( same command for PW + Touch so ditch the detection )
#		PLATFORM="$(cat /sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes)"

		SSSTATE=`lipc-get-prop com.lab126.powerd preventScreenSaver` 

cd /mnt/us/extensions/$APP

# be certin we only have one instance

killall -9 $APP &> /dev/null
usleep 500

# prevent SS from bothering us mid app.
lipc-set-prop com.lab126.powerd preventScreenSaver 1

# Run it ( same command for PW + Touch so ditch the detection )
GTK_IM_MODULE=kindle \
GDK_PIXBUF_MODULE_FILE=/mnt/us/extensions/$APP/usr/bin/pixbuf/gdk-pixbuf.loaders \
${EXTENSION}/$APP/usr/bin/$APP

lipc-set-prop com.lab126.powerd preventScreenSaver "$SSSTATE" 


