GP2X open2x autorun after exit program


b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,396
Have the following issue for my GP2X F200 with Open2X installed. After booting GMenu2X appears with all programs / icons available (in a certain theme) but after playing any game and exit it starts in 'official frontend' without the theme and no programs (only settings, applications and an EMU section that is not filed with anything)
Using explorer to run autorun.gpu starts GMenu2X correctly again.

Any suggestions how to fix this?
 

M-HT

Very Active Member
Joined
Nov 30, 2007
Messages
634
Location
Bratislava
Website
github.com
I don't have Open2X on my GP2X so I can't verify it, but most (if not all) GP2X applications execute /usr/gp2x/gp2xmenu so I would start looking for the problem there. There may be an issue with this file.
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,396
I don't have Open2X on my GP2X so I can't verify it, but most (if not all) GP2X applications execute /usr/gp2x/gp2xmenu so I would start looking for the problem there. There may be an issue with this file.

Thanks! Checked with termula2x - cat /usr/gp2x/gp2xmenu

Result

#! /bin/sh
cd /usr/menu
./gmenu2x&

The "&" after gmenu2x doesn't seem to belong there. Tried to use VI with termula2x to remove it but don't know how to navigate in a file, might try sed later.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,739
Location
Somewhere off the coast of the EU
Removing a character with VI is easy; navigate to the character to remove using the arrow keys (sometimes you might have to use j and l to move around, but most vi's these days are configured to respond to the arrow keys assuming you have them), and press x once to remove the character. Then save the file and exit with ':wq'.
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,396
It is not responding to arrow keys, keep in mind this is the GP2X and not attached to a keyboard. Termula2x has a lot of shortcuts and is customizable as well. Nice program. Easiest solution is probably creating the file on my PC, copy on SD and overwrite the file in NAND.

Might play around with the latest Termula2x version anyway though - the README file provides some more details. It even has touchscreen support.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,739
Location
Somewhere off the coast of the EU
Yeah, I don't know what kind of virtual keyboard the gp2x has if one at all. Driving vi without any kind of keyboard might be equally as hard as using any other text editor though.
 

M-HT

Very Active Member
Joined
Nov 30, 2007
Messages
634
Location
Bratislava
Website
github.com
Thanks! Checked with termula2x - cat /usr/gp2x/gp2xmenu

Result

#! /bin/sh
cd /usr/menu
./gmenu2x&

The "&" after gmenu2x doesn't seem to belong there. Tried to use VI with termula2x to remove it but don't know how to navigate in a file, might try sed later.
The "&" after gmenu2x belongs there. It means the script doesn't wait until gmenu2x exits, but continues executing immediately. Which means that the application which executed the script will exit.

Is /usr/menu/gmenu2x another script or executable ?
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,396
The "&" after gmenu2x belongs there. It means the script doesn't wait until gmenu2x exits, but continues executing immediately. Which means that the application which executed the script will exit.

Is /usr/menu/gmenu2x another script or executable ?

Ah, so no space needed between ./gmenu2x &?

/usr/menu/gmenu2x is an executable. Tried to open it with termula2x and didn't provide anything readable.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
14,739
Location
Somewhere off the coast of the EU
Ah, so no space needed between ./gmenu2x &?
Nope. And it was a surprise to me as well but sleep 10& returns immediately indicating it's forking a process to hold the sleep command and returned control to me immediately. But yeah, when typing it I've always added the space too.
 

M-HT

Very Active Member
Joined
Nov 30, 2007
Messages
634
Location
Bratislava
Website
github.com
The remaining thing to check is, whether GMenu2X is started the same way on boot or not. And if not, then change /usr/gp2x/gp2xmenu accordingly and see if it fixes the problem.
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,396
The remaining thing to check is, whether GMenu2X is started the same way on boot or not. And if not, then change /usr/gp2x/gp2xmenu accordingly and see if it fixes the problem.

Open2X has an option to run autorun.gpu from SD card.
autorun.gpu is slightly different than /usr/gp2x/gp2xmenu

#! /bin/sh
cd /mnt/sd/gmenu2x
exec ./gmenu2x

So they are not the same, and the SD card autorun.gpu starts gmenu2x from SD card. This provides another gmenu2x environment that is messed up.
I think I have two options to solve this.
Fix the NAND gmenu2x version or change /usr/gp2x/gp2xmenu to start the SD cards version of gmenu2x.
 
Top