SFS-Exec

Miscellaneous tools
Message
Author
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#121 Post by nooby »

Seaside I agree with Jasper this is a good thing. You explored what is possible within the restraints there was due to the way it is built.
So thanks for the good tools you have provided. It has been an exciting journey to follow. But Edit the first page so it is very clear what it does and what it does not do and under what circumstances :)

Jasper thanks for all testing and idea efforts you also put into this. I feel embarrassed how I flood the thread. I got carried away out of happiness that several years of waiting could find an easy solution.
Now I have to go find the thread and post that did let me have the pupmode 13 on HD. I know I have a post on a thread that inspired a friendly guy to make one and only have to find that one again. :)

Now to my question
I am so dense that it is beyond embarrassing. Hahah

You edited out exact everything in that file and still when you click on it it just works?

How could that be so?


And this "I have a lightning fast sfs loader and I can update my save file at any time I choose by clicking on the circular blue desktop save icon. "

Seaside if I get it. The code Bilko gave also only work if one have the pupsave file on an USB?

So what I need to do is to find a Puppy that is a series 4 puppy because then I can use your idea to make the pupsave file into a sfs and that way get my personal preferences and still not save to the savefile.

So when you do want to add a preference or change one then you open it up and do the change and then make an sfs out of it again.
As easy as pancake :)

So I only have to find a puppy based on 431 then or 420

Maybe Lighthouse pup or latest Quirky 142 or Fluppy even?
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#122 Post by Jasper »

Hi nooby,

My understanding is that seaside's SFS-exec.pet worked well in all your Puppy versions where you used it, except when you installed SFS-Exec-pupsave-noshut.pet on one of your Puppies the only side effect you noticed was that you could no longer use the fast sfs loader.

Can you try that again and just check if the save worked properly. You could test it by making a folder in root called say aasavetest (so that it shows at the start of your root directory). Then do a hard poweroff (i.e. with your hardware poweroff as opposed to using the menu poweroff). Then reboot and check if you still have aasavetest.

If that works you have succeeded with one of your two objectives.

You could then install say, shinobar's sfs-on-the-fly style pet which is likely to work well (hopefully even with your SFS-exec.pet still installed). If it works and your save still works (just delete aasavetest to check) then you have only lost the lightning speed of seaside's sfs loader.

Alternatively, you might experiment with uninstalling seaside's two pets and then reinstalling them (perhaps in a different order) and on your other Puppies.

You could wait to see what seaside thinks about my suggestion before you consider trying it - but (ideally) take a backup of your save file(s) before you test if you try it on any/all of your Puppy versions.

My regards

I have no answers to your many questions - my concern is if the magic works properly.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#123 Post by nooby »

Thanks Jasper. I will not load Shinobar's it is way too slow for my impatient brain. :)

But I am trying to grasp the difference.

I am testing Quirky 142 and that is a proper Puppy 431 and it has Seamonkey in it and I have installed Seasides SFS-Exec and that works for Opera browser SFS but when I try to load FF.sfs two different versions then none of them start up.

So what could that be about?

Fluppy that also are puppy431 has so many preferences from Jemimah that it take for ever to change them back to what I prefer so I will not touch that one if I can find something better.
Lighthouse pup are puppy420 I guess but that one too has so many different prefs so I hesitate to test it again.

What else Puppy 431 has not the drivers I need? Refuse to boot? Not sure.

I need to find something that just works :)

So now I am stuck in that Quirky fail to load the FF.sfs that worked on the two other os.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#124 Post by nooby »

Hahaha I am very dense today or always:)
So much work and lost everything. Okay my fault I should have saved it first. I start all over again. And do a new test.
old text follows

okay I did as you told me but most likely I did not grasp.
if I have no save file at all how can it save anything at all?

okay I look in root now. nope nothing there Which is to expect due to me having no savefile.

I have to save using the save button that Seaside gave me and then start up again and then do what you told me.
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#125 Post by Jasper »

Hi nooby,

I found shinobar's sfs-on-the-fly to be quite quick, and as I am not short of RAM I frequently leave my activated programs (sfs, portable and mainstream) minimized to my system tray so they reactivate instantaneously.

My regards

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#126 Post by nooby »

Thanks Jasper. It seems the order one do thing are imprtant.

I first activated the pupsave and then the sfs-exec and then used the sfs-exec- pup-save to save the thing and that created two save buttons

save-pup has this text
#!/bin/sh
# used with SFS-exec to enable pupsave

mv /usr/sbin/snapmergepuppyHOLD /usr/sbin/snapmergepuppy
exec wmpoweroff

save-to-flash has this text

#!/bin/sh
#2007 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html)
#sends a request to /usr/sbin/savepuppyd to save the session.
#v4.01 19may2008 BK: request now to /sbin/pup_eventd (savepuppyd is history).
#v411 /tmp/snapmergepuppyrequest is processed in /sbin/pup_event_frontend_d. (from v403 i think)
#101221 fix yaf-splash.

export LANG=C
export DISPLAY=':0'

#LANG=C /usr/X11R7/bin/yaf-splash -display :0 -font "8x16" -outline 0 -margin 4 -bg yellow -text "NOTICE:
yaf-splash -bg yellow -text "NOTICE:
Request to save current session is queued. Please wait,
another message will popup when the saving occurs..." &
RETVAL=$?
YAFPID=$!

touch /tmp/snapmergepuppyrequest

while [ -f /tmp/snapmergepuppyrequest ];do
sleep 1
done

[ $RETVAL -eq 0 ] && kill $YAFPID


###END###


Not sure what that means now I do your test.
Edit after test. Jay you and Seaside have brains while me don't have a brain to rely on :)

It workd despite Quirky 142 has a built in safeguard again shutting off using the harware reboot thing. It told me it will save the changes despite me trying to not do it and it wrote that now it has saved them and then I booted up and they where gone.

So that give me a chance then if I screw up then I only have to do a hard reboot and that would start anew next time. Now I will test if the sfs works. I guess they are the wrong kernel or something they refuse to load?
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#127 Post by Jasper »

nooby,

save-pup has this text
#!/bin/sh
# used with SFS-exec to enable pupsave

mv /usr/sbin/snapmergepuppyHOLD /usr/sbin/snapmergepuppy
exec wmpoweroff
---------------------------------------------------
The above is not

SFS-Exec-pupsave-noshut.pet

which you tried before and I suggested you try again.

My regards

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#128 Post by nooby »

So you want me to try that one again Hm

I as you me but it still saved the dit in root and that is surprising cause it on had the time while the power button still has power going due to the Capacitors holding 11Volt or something for some parts of a second?

Tested it two times.

What was the thing with you editing out using # in his bash script why would it still work or was that so you don't accidently hit it you change it so it would not absolute nothing?

I guess I have to revert to the brute force method.

What guy was it telling us he just take his backup and copy it over the corrupted savefile and that restore it to the backup and that way it does not remember hm that would not work because it would still save when one shut down like this one do?

one need to boot with pfixram and copy it to the directory and then reboot?
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#129 Post by nooby »

Seaside the code you gave me did no prevent me starting another Chromeium.

Does one have to reboot first? Okay I do it now in case it is important that it start kind of the usual way?

Here is how it look in that file

#!/bin/sh

#SFS-Exec loads Aufs union-layered mounted filesystems and Exec in SFS /usr/share/applications/*.desktop
# seaside 6 February 2011
# Thanks to shinobar, goingnuts, 01micko and Barry of course for the Aufs mounting and unmounting code

[ $1 ] && ADDSFS=$1 || exit
[[ `losetup | grep $1` ]] && yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text
"ATTENTION! $1 seems to be already mounted.
Perhaps you closed the program and want to restart it.
If the program is not in the menu list, in a terminal
run 'fixmenus' and then restart the window manager." && exit

N=$(LANG=C df | grep '/initrd/pup_ro'| sed -e "s/^.*\(.\)$/\1/"| sort | tail -n 1) #finds the highest pup_ro
[ $N ] || N=3 # precaution
N=$(($N + 1))
MNTPNT=/initrd/pup_ro$N
mkdir -p "$MNTPNT"

should it be double [ or what that some way to get it pass the forum code or something ?

Edit back from reboot and tested to start Chromium and then shut it down using the x in upper right corner and then starting a new one using the sfs.exec and it did start a new one. unloader says it is two working now.

I listen to nrk.no in one of them and use firefox to write here to you.
norwegian folkemusikk in the background.

What did I do wrong? oops it is 15 past 11PM so I should go to bed.
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#130 Post by seaside »

nooby wrote: Edit back from reboot and tested to start Chromium and then shut it down using the x in upper right corner and then starting a new one using the sfs.exec and it did start a new one. unloader says it is two working now.

What did I do wrong? oops it is 15 past 11PM so I should go to bed.
Nooby,

The edit change above is correct and after saving the edit, the change will be effective without rebooting. Of course, to make it permanent when next rebooted, you'll have to "save" the change to the pupsave file.

It wouldn't allow me to reload anything that was already loaded when I tried it on several SFS files.

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#131 Post by nooby »

I am in Lupu513 as it behave after Pemasu made it into Snowpup 5
so maybe that makes it different. It never show the message you put there.
I did save it now when I look it like this.

#!/bin/sh

#SFS-Exec loads Aufs union-layered mounted filesystems and Exec in SFS /usr/share/applications/*.desktop
# seaside 6 February 2011
# Thanks to shinobar, goingnuts, 01micko and Barry of course for the Aufs mounting and unmounting code

[ $1 ] && ADDSFS=$1 || exit
[[ `losetup | grep $1` ]] && yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text
"ATTENTION! $1 seems to be already mounted.
Perhaps you closed the program and want to restart it.
If the program is not in the menu list, in a terminal
run 'fixmenus' and then restart the window manager." && exit

I could test it in quirky 142 maybe. But I am lazy just now.

I works partly in that it sometimes don't start a new version but it does show that it did load it when one look in the unloader even it never started.

And it sometimes is difficult to unload it which has never happen before so some of the code do work.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#132 Post by sc0ttman »

Firstly, sorry I have not read the whole thread..

But, did you incorporate a function similar to the 'pinstall.sh' function that we have with PET files? Because when loading certain SFS files, they require extra work, as the pinstall is not normally executed...

As I see it, you, shinobar and goingnuts have all made good SFS work...

It would be great to see all 3 of you incorporate the execution of any "pinstall.sh" scripts found in the root of the SFS when it is loaded on the fly.. Then the pinstall could be optionally removed - unless that causes some problems.

I think this may be a good idea, as more OTF SFS loading will catch on, I am sure of it... Also many SFS files were convereted for PET files originally... The vbox SFS around, for example...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#133 Post by nooby »

Scottman sorry me flooded this thread with so many posts. Makes it hard to follow.

Important thing you take up there. so these things inside a sfs can start installing things then? that end up in a save file too. Hmm

So one would need a way to prevent these from changing things one don't want to have changed. Hopefully seaside or somebody else can build such safeguards then into the sfs-exec. I use it almost daily. So practical.
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#134 Post by seaside »

sc0ttman wrote:
It would be great to see all 3 of you incorporate the execution of any "pinstall.sh" scripts found in the root of the SFS when it is loaded on the fly.. Then the pinstall could be optionally removed - unless that causes some problems.

I think this may be a good idea, as more OTF SFS loading will catch on, I am sure of it... Also many SFS files were convereted for PET files originally... The vbox SFS around, for example...
scOttman,

SFS-Exec reads and executes a script (if there is one) before the SFS file is loaded and is the equivalent of a "pinstall".

"Sometimes you'll need special handling depending on individual SFS files. You can create a script named "SFSFILENAME"SETUP. e.g. vlc-0.9.2-i386_431.sfsSETUP and place it in the SFS directory. The script will execute before the program is started, allowing copying of config files or any other changes needed before the program starts."

Regards,
s

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#135 Post by sc0ttman »

seaside wrote:scOttman,

SFS-Exec reads and executes a script (if there is one) before the SFS file is loaded and is the equivalent of a "pinstall".

"Sometimes you'll need special handling depending on individual SFS files. You can create a script named "SFSFILENAME"SETUP. e.g. vlc-0.9.2-i386_431.sfsSETUP and place it in the SFS directory. The script will execute before the program is started, allowing copying of config files or any other changes needed before the program starts."

Regards,
s
thanks for the info... But why not just use a file called 'pinstall.sh' instead?? It would greatly increase compatibility with other tools and packages..

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#136 Post by seaside »

sc0ttman wrote: thanks for the info... But why not just use a file called 'pinstall.sh' instead?? It would greatly increase compatibility with other tools and packages..
scOttman,

If you mean a file called "pinstall.sh" inside the SFS file, this could be done, but you'd have to edit the SFS file. Outside of the SFS file, it has to have an identifying name for each SFS file, otherwise it would load the first "pinstall.sh" found which might not be the one belonging to the loading SFS file.

With some SFS files, I frequently have some specific configuration profile information only for that SFS to setup before executing the program.

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#137 Post by nooby »

seaside wrote:With some SFS files, I frequently have some specific configuration profile information only for that SFS to setup before executing the program.
Oh please share such vital info. Could help many.
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#138 Post by seaside »

nooby wrote: Oh please share such vital info. Could help many.
Ok,

Here's one for my softmaker.sfs which copies my /root.softmaker profile (copied and not linked so that I can experiment with changes which will not be saved). And, similar types are made for Firefox and Thunderbird.

Code: Select all

#!/bin/sh
# Softmaker SFS setup

cp -a /mnt/sdb6/.softmaker /root/.softmaker
ln -s /mnt/sdb6/SoftMaker /root/SoftMaker 
This one is used with a wine sfs for loading a specific program

Code: Select all

#!/bin/sh

#general wine setup followed by specific program
ln -s /mnt/sdb6/.wine /root/.wine  
ln -s /mnt/sdb6/Wine_radiosure.desktop /usr/share/applications/Wine_radiosure.desktop
ln -s "/mnt/sdb6/RadioSure Recordings" /root/"RadioSure Recordings"
Here's one for any SFS that requires Java (also an SFS)

Code: Select all

#!/bin/sh

SFS-Exec /mnt/sdb6/java-jre-6u21_sfs4.sfs
Of course, you could combine SFS files, but that is another step and if either SFS file is updated, all you need is a minor script change instead of remaking the combined SFS.

Cheers,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#139 Post by nooby »

Could this explain why Firefox fail to start on one of Barry's distros?

He uses Seamonkey and most likely there already being a .mozilla dir it maybe don't want to create a new with same name so one would have to delete the seam monkey one to make room for the Firefox?

and you script then allow it to or something. Sorry maybe you already told me to delete the .mozilla and I have forgotten. it only did happen on one distro and not on the others.
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#140 Post by seaside »

nooby wrote:Could this explain why Firefox fail to start on one of Barry's distros?

He uses Seamonkey and most likely there already being a .mozilla dir it maybe don't want to create a new with same name so one would have to delete the seam monkey one to make room for the Firefox?

and you script then allow it to or something. Sorry maybe you already told me to delete the .mozilla and I have forgotten. it only did happen on one distro and not on the others.
Nooby,

Yes. For example my firefox setup file has this -

Code: Select all

#!/bin/sh
[[ -d /root/.mozilla  ]] && rm -r /root/.mozilla
 cp -a /mnt/sdb6/mozilla4 /root/.mozilla
which deletes the existing .mozilla directory and replaces it with mine. You can also link it instead of copying, if you wish all changes to be saved.

Regards,
s

Post Reply