EmulationStation - Main Menu - Remove Exit Option
-
@willmurray461
I tried that option both via FTP and editing manually but had no luck, maybe anyone could make it work -
@willmurray461 That option unfortunately just removes the Quit Emulationstation menu option from the Quit menu, but doesn't remove the rest of the entries (Reboot/Shutdown/Restart ES).
-
I have no issues using KidMode, but is there a way to add the kidmode option to all the games (Menus I can do manually, but to do 1000's of games would be a nightmare) Can someone write a script to maybe do this?
-
Ok, can't write a "real" script right now, but if you have a default configuration you may try something like :
for sys in /home/pi/.emulationstation/gamelists/*; do cp $sys/gamelist.xml $sys/gamelist.xml.bak && xmlstarlet ed -L -s "/gameList/game" -t elem -n kidgame -v true $sys/gamelist.xml; done
This will look all systems, make a .bak copy in the same directory before modifying the gamelist.xml to add the kidgame XML element on each game.
Use at your own risk ( it's late here), but the theory is here :)
Edit : Thanks @mitu !
In the light of a fresh morning, this seems to be ok, I was not so tired :)Additional notes :
- you may have to install xmlstarlet first :
sudo apt install xmlstarlet
- you have to quit ES before running this script
- you may have to install xmlstarlet first :
-
Cool thanks I will give it a go when I get a chance.
-
@sano
Is there anyway you could have it check if the <kidgame> is already there and if so change value to true. I noticed when I scraped some new games the code was not there and I reran and now it has it listed twice. I can restore my backups, but it over written my originals so my backups have the <kidgame> on them.But otherwise it worked great.
Thanks for your help.
-
Found a work around. I can run this and it will delete all the kidgame entry's and then I can rerun the other one. Thanks anyways. :)
for sys in /home/pi/.emulationstation/gamelists/*; do cp $sys/gamelist.xml $sys/gamelist.xml.bak && xmlstarlet ed -d "/gameList/game/kidgame" $sys/gamelist.xml.bak > $sys/gamelist.xml; done
-
@almulder
I just get @home and see your posts.
Congratulations on finding a solution by yourself :) -
@Sano Sorry to bug you, but maybe you can help me with one other xmlscarlet issue I have I need to rename an emlement. it is curently called thumbnail and i need to rename it to marquee. I have the code below, but no luck. It displays on screen while running that it has changed, but the files never get updated. I have even logged in as root and same issue. the files are never updated. but the output shows it was done.
for sys in /home/pi/addonusb/roms/*; do cp $sys/gamelist.xml $sys/gamelist.xml.bak && xmlstarlet ed -r "/gameList/game/thumbnail" -v marquee $sys/gamelist.xml; done
I have even tried to just focus on one system.
xmlstarlet ed -r "/gameList/game/thumbnail" -v marquee /home/pi/addonusb/roms/snes/gamelist.xml
Same thing, just displays on screen, file does not update.
-
You did right the first time, so I don't understand why you're struggling with this :)
By default xmlstarlet just prinnt the result.There are 2 ways to modify a file :
- what I did : put the -L (or --inplace) option :
-L (or --inplace) - edit file inplace
- what you did : redirect the output to the gamelist.xml file with a
>
- what I did : put the -L (or --inplace) option :
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.