View Single Post
Old 09-27-2013, 07:09 PM   #6
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I put together a script for starting up things

Code:
#!/bin/sh
##################################################################################
#
# Twobob generalised starter for a fronter serviced application.
#
##################################################################################

cd /mnt/us/extensions/pente

#setup helpful variables...

		EXTENSION=/mnt/us/extensions

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

		PLATFORM="$(cat /sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes)"

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

# be certin we only have one instance

killall -9 pente &> /dev/null
usleep 500

#check for patch (Active)

if [ ! -d /tmp/twobob/xdg/awesome/ ]; then

		if [ -d /mnt/us/extensions/fronter/arch ]; then
	
			eips 3 37 "FRONTER dir not activated. Installing patch"
			sleep 2
			/mnt/us/extensions/fronter/arch/mount.sh &

		else

			eips 3 37 "FRONTER patch not installed." 	
			eips 3 38 "please install it, then retry"
		fi

	sleep 2
	exit;
fi

# Okay we seem likely to start the game at this point so...

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


#uncomment for your ver.

if [ "$PLATFORM" = "${PLATFORM/758/}" ]; then
#Touch

# Insert your Touch Specific Start command here
# NOTE: In THIS instance pente is an application that will return to process without a backgrounding &
# we will run pente -nostealth to emulate a usual "blocking" apps activity for the same of this demo
# THEN we will add a & - because you WILL want one AFTER the app call (whether the app is blocking or not)
# always add one...

${EXTENSION}/pente/usr/bin/pente -nocolor -noiconic -geometry 800x600 -x11 -nostealth &  

fi

if [ "$PLATFORM" != "${PLATFORM/758/}" ]; then
#It's a PW

# Insert your Paperwhite Specific Start command here

${EXTENSION}/pente/usr/bin/pente -nocolor -noiconic -geometry 1024x758 -x11 -nostealth &

fi

# check if we should restore the setting once per minute

while :

do 	
	if [ -n "`pidof pente`" ]
    then
        sleep 60

    else
    	lipc-set-prop com.lab126.powerd preventScreenSaver "$SSSTATE"
		exit;
    fi

done

# all done.

Last edited by twobob; 09-27-2013 at 10:18 PM.
twobob is offline   Reply With Quote