Multiple Processes @ Startup


bernwa

Still Fresh
Joined
Aug 24, 2006
Messages
48
hello there ppl.

this may seem like a n00bie thing to ask you guys, but i have scoured this forum and multiple readme's to find an answer, but i'm afraid i have come up with nothing.....

i want to launch gmenu2x and energysaver at the same time on startup. ive tried editing the autorun.gpu, but it doesn't work (or i am doing it wrong!). could someone please give me the correct script and/or method of doing this? i'm getting rather frustrated as i can't work out how to launch background applications automatically. i have to manually execute them when i want to use them, which is ridiculous.

please help :(

bernmonkee :p
 
To run applications in the background, you need to put an '&' at the end of the line. You don't need to add one for the last one in your list, because it can run in the foreground...
 
I'm no expert myself but I remember seeing this being posted here

A_SN said:
CODE
#!/bin/sh
cd /mnt/sd/gmenu2x
exec ../App/colourd_070717/colourd.gpe&
exec ./gmenu2x

Just replace "/App/colourd_070717/colourd.gpe" with the path to the energysaver's .gpe

Notepad++ is a very easy to use program for making/editing scripts like this.
Remember to save it in Unix format (Format>Convert to UNIX format) and of course as autorun.gpu :p
 
Last edited by a moderator:
thanks guys, but it still doesn't want to work, i just end up with a black screen :(

my autorun.gpu is as follows;

#!/bin/sh
cd /mnt/sd/gmenu2x
exec ../Apps/EnergySaver/EnergySaver/EnergySaver.gpu&
exec ./gmenu2x

please forgive my ignorance, but even with my limited programming knowledge that script is doomed to fail isn't it? :(
 
Is EnergySaver/EnergySaver/EnergySaver.gpu& the correct path?

Also, make sure your file has Unix line breaks, that's easy to setup in Notepad++ or Programmer's Notepad.
 
i tried it with gp2xsleep the path was correct - i used os x textedit to edit the file

i just tried energysaver but i get an error in spanish something about configuration
 
Alex. said:
Is EnergySaver/EnergySaver/EnergySaver.gpu& the correct path?

Also, make sure your file has Unix line breaks, that's easy to setup in Notepad++ or Programmer's Notepad.
its the correct path yes, but im intrigued because it doesn't seem to have a .gpe file, just a .gpu file.

i'm also a newb when it comes to unix, but surely ms notepad is suitable, its still using ascii standard, isnt it?
 
Last edited by a moderator:
bernwa said:
i'm also a newb when it comes to unix, but surely ms notepad is suitable, its still using ascii standard, isnt it?
Actually, it isn't. It's a gamble, on older firmwares I'm pretty sure it doesn't work. Why not just play it safe and get Notepad++, it's such a nice text editor, it will become your choice over Notepad for sure :) Once in there, go to Format > Convert to UNIX format.
 
Last edited by a moderator:
It's essential to convert to Unix format. A few days ago I made a script in default format (ms-dos) and it refused to run properly on my gp2x.
 
bernwa said:
i'm also a newb when it comes to unix, but surely ms notepad is suitable, its still using ascii standard, isnt it?
The problem isn't the character definitions, it's that unix formatting only uses one character to break lines (LF), and dos & windows use two (CRLF).
 
Last edited by a moderator:
right then....

ive managed to get energysaver to run at startup, but as mentioned above, i get an error message in spanish, and gmenu goes nuts.

thanks for the notepad++ tip though, it looks cool :)

norm - could you please post your complete autorun.gpu? it may help fix the problem :p
 
ive tried editing the original gmenu autorun.gpu, and editing the energy saver autorun.gpu. both work, but do not execute the energy saver function :(

neither of them cause gmenu to flicker, but neither of them actually run energysaver.gpu, or so it seems :|
 
Blah said:
norm said:
iv got it working - just edit the path at the bottom of the energysaver autorun to gmenu and all works fine :)

it runs gmenu, but doesn't run energysaver.

ive tried this;

#!/bin/sh
cd /mnt/sd/gmenu2x
exec ../Apps/EnergySaver/EnergySaver/EnergySaver.gpu&
exec ./gmenu2x


which end in the energysaver error and flickering screen.

this;

#!/bin/sh
# AutoRun script for EnergySaver - Script de inicio para EnergySaver
# Copy to root of SD Card or NAND - Copiar a la raiz de una SD o de la NAND
# Copy setbl to the same place - Copiar setbl al mismo lugar
# Activate autorun feature and - Activar el autoinicio de la consola y
# NAND automount if necessary - el montaje de la NAND si hiciera falta

# Edit only this two lines - Editar estas dos lineas
SPEED=20
TIME=30
EXCEPTIONS="mplayer MusicPlayer g_file_storage"
# Please, don't delete the quotes - Por favor, no borre las comillas
# PLEASE, DO NOT EDIT UNDER THIS LINE - NO EDITAR POR DEBAJO DE ESTA LINEA
# ---------------------------------------------------------------------------- #
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
# ---------------------------------------------------------------------------- #
killall setbl

${0%/*}/setbl $SPEED $TIME $EXCEPTIONS &>/dev/null &

cd /mnt/sd/gmenu2x
exec ../Apps/EnergySaver/EnergySaver/EnergySaver.gpu&
exec ./gmenu2x


which does exactly the same.

and this;

#!/bin/sh
# AutoRun script for EnergySaver - Script de inicio para EnergySaver
# Copy to root of SD Card or NAND - Copiar a la raiz de una SD o de la NAND
# Copy setbl to the same place - Copiar setbl al mismo lugar
# Activate autorun feature and - Activar el autoinicio de la consola y
# NAND automount if necessary - el montaje de la NAND si hiciera falta

# Edit only this two lines - Editar estas dos lineas
SPEED=20
TIME=30
EXCEPTIONS="mplayer MusicPlayer g_file_storage"
# Please, don't delete the quotes - Por favor, no borre las comillas
# PLEASE, DO NOT EDIT UNDER THIS LINE - NO EDITAR POR DEBAJO DE ESTA LINEA
# ---------------------------------------------------------------------------- #
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
# ---------------------------------------------------------------------------- #
killall setbl

${0%/*}/setbl $SPEED $TIME $EXCEPTIONS &>/dev/null &

cd /mnt/sd/gmenu2x
exec ./gmenu2x


which doesn't seem to call the energysaver function at all (obviousley)

am i doing this wrong?
 
Last edited by a moderator:
Ryo said:
Try this:
CODE
/mnt/sd/Apps/EnergySaver/EnergySaver/EnergySaver.gpu &
cd /mnt/sd/gmenu2x
exec ./gmenu2x
i still get the spanish error message, and gmenu goes crazy!, its a good job i'm not eplileptic! :)

hmmmmm....
 
Last edited by a moderator:
Back
Top