Pandora PND_post_script.sh equivalent for inside PND


Hooka

That Guy!
Joined
Jul 19, 2003
Messages
1,746
Age
41
Location
Canada
Website
Visit site
Is there a specific pre/post run script I can make that can reside inside the PND that won't affect the user creating their own outside it?

In certain instances where, say in the case of ginge, it segfaults and can't complete it's usual run script I'd like to call a post script from inside the PND to cleanup because otherwise it leaves some environment variables set that interfere with the common operation of the Pandora normally.

I don't want the user to make their own pre/post scripts and mine to be overridden, as they may not know what I did and why they are getting new issues from making their own.
 
You can't stop the user from overriding anything in a PND, but if you want something they won't accidentally override, just make your exec command= point at a script that firstly calls your existing exec command then invokes your post-run actions.  Or you might even be able to do command=old_command; post_run (or even old_command || post_run if your old_command returns an error code on segfault) if the command argument gets passed through to bash or another suitable shell; I've not tested that.

Edit: If it's just env vars persisting, declaring them as local might be all you need to do actually.
 
Last edited by a moderator:
The environment variables only affect current shell and not the whole system, when your PND exits the shell process will be destroyed along with all the env var changes.

tl;dr: I don't see any problems to solve here.
 
Just noticing that when ginge segfaults everything inside pnd_run that executes after the segfault seems to still point to the wrong libs, so the framebuffer doesn't get reset properly, etc. I guess it doesn't matter that much given that once the pnd_run finishes they're gone for good, just makes it cleaner...

What I guess would be a simple fix is check for a pnd_post_script.sh and just copy it outta the PND if there is none, so if they go to add one they can see that it's there and they can add to it.
 
Just noticing that when ginge segfaults everything inside pnd_run that executes after the segfault seems to still point to the wrong libs, so the framebuffer doesn't get reset properly, etc. I guess it doesn't matter that much given that once the pnd_run finishes they're gone for good, just makes it cleaner...

What I guess would be a simple fix is check for a pnd_post_script.sh and just copy it outta the PND if there is none, so if they go to add one they can see that it's there and they can add to it.
Maybe just put a simple


export LD_LIBRARY_PATH=/lib:/usr/lib

just after the call to ginge to reset lib path?
 
when it segfaults it never manages to complete the run.sh that is ginge's main executable (from the PND launch standpoint), I tried cleaning it up there but to no avail.
 
pnd_run being affected by LD_LIBRARY_PATH (and fb not being restored) is actually a problem with pnd_run itself, I made an attempt to fix it, try running OS update.

Still don't see how ginge.sh would not complete the script though, even on segfault the script should continue.
 
Last edited by a moderator:
Can I ask something? I can't make PND apps default like .avi or similiar documents to vlc2. How can I make them default?
 
notaz: will try when I get home, my pandora is one of the "noisy" wifi ones and will most likely take down the hotel I work @ wifi and we can't have that. I'm also wondering if it's segfaulting inside the loader then not exiting the loader therefore never continuing the script... dunno would have to look into it more...
 
Back
Top