How to add SFS files to a multisession CD/DVD?

Discuss anything specific to using Puppy on a multi-session disk
Message
Author
User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#16 Post by RSH »

OK.

Hope the attached script comes nearly to your request. It's now much easier to change. Just needs to edit the program name and the sfs name once on top of the script. Also has now option to unload the sfs or not to unload.

It offers a GUI to unload the SFS - 2 seconds after the application has started.

Image

About sfs_load:

To disable the "copy GUI" of sfs_load go to line 2192 in /usr/sbin/sfs_load and change (comment it out)

Code: Select all

choosepart $TOPART || finish
to

Code: Select all

PART=NOCOPY
I think, that's all

...

Just a thought:

You can put all such created scripts in one directory, then get the .desktop files from the sfs files you want, put them in the running OS and change the "Exec=" entry of such .desktop files to call the Simple-RunScripts.

Just a thought.

RSH
Attachments
simple-run-script-b.gz
(1.7 KiB) Downloaded 989 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#17 Post by 8-bit »

If puppy has a way to poll as to if an application is running, that could be used to check if the application was running and if not, unload the SFS.
I had thought of top which is part of most puppy versions.
But I do not think it has the option of polling it externally with a script to see if an application is running.

Anyway, you are on the right track.
As long as the dialog window is open the application will run and the SFS file remain loaded.
And clicking on the dialog window unloads the SFS file.

If this could be worked out, it would be a great way to run games in SFS form as the SFS would be auto unloaded upon exiting the game.

I know we are getting away from the initial subject of being able to load SFS files stored along with a multisession CD/DVD.
But with your script, if this action was doable, it would be a nice addition for Puppy!
And for loading a SFS file from a multisession CD/DVD, as flash stated, it would save having to carry extra media that contained SFS files.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#18 Post by RSH »

If puppy has a way to poll as to if an application is running, that could be used to check if the application was running and if not, unload the SFS.
I had thought of top which is part of most puppy versions.
But I do not think it has the option of polling it externally with a script to see if an application is running.
I have tested top - seems not to be very useful. But that's a good hint, though!

Puppy (busybox) has pidof. I'm running currenty Aqualung to listen to some Music while coding (currently: Allman Brothers). I'm not running Abiword. So pidof aqualung returns 18004, pidof abiword returns nothing (which means an empy string "" returns).

So, this could be used. But as I mentioned inside the Script, the script quits also when exiting the application which was executed by the script. Only solution is a second script to call. Runs in background and exits itself after the sfs is unloaded.

Will give it a try...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#19 Post by RSH »

AutoUnload SFS works. But for some unknown reasons the application starts twice now. Got to find out...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#20 Post by RSH »

OK. Done!

This script loads the sfs, runs the application and -if the application runs- creates a AutoUnload Script in /tmp. Let's say one does use several applications using several different edited versions of this script, it creates the AutoUnload Script related to the sfs which used it. So, one can have also several different named AutoUnload Scripts to unload each and every time the one and only, the right one sfs, which is wanted to unload. :D

The AutoUnload Script removes itself after unloading the sfs! 8)

OK? :lol:

We must now act a little carefully. Otherwise this thread has to be renamed to SFS P.L.U.S., 3rd Edition. :lol:

Note: it doesn't make any difference if this here is used either on hd, usb or cd/dvd. 8)

It's still easy to handle! :D

RSH
Attachments
simple-run-script-c.gz
As above: remove the .gz and make executable
(2.48 KiB) Downloaded 966 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#21 Post by Flash »

I can split posts from this thread and make a new thread with them, if that would be a good idea. Unfortunately, many of the posts having to do with the new topic will probably also make reference to the original topic, confusing things. :(

I have to say that I consider it a serious flaw in the design of an operating system that it doesn't keep track of, has no way to tell, how many instances of a program are running. As far as I know, no operating system has this as a fundamental feature of its design. :?

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#22 Post by RSH »

Yes, to get information about how many instances of the same application are currently running would be very useful. Surely in several cases.

But in this case here - NOT needed!

I did run three (3) instances of AlsaPlayer several times on some testings and even though the AutoUnload script for AlsaPlayer's SFS has been created three (3) times that way, it does unload the sfs only after the last instance of AlsaPlayer was closed. :D 8)

Am I a genius, or what? (just kidding) :lol:

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#23 Post by RSH »

OK.

Again refined.

Now, If running several instances of a program using this here script doesn't longer create the AutoUnload Script several times (and overwriting the previous one) - just once! Also, it just runs now once in background - not doubled or tripled or whatever count of instances you want to run the program. 8)

SFS is unloaded automatically when last instance of program is closed. :D

RSH
Attachments
simple-run-script-d.gz
as usual: remove the .gz and make executable
(2.64 KiB) Downloaded 1018 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#24 Post by 8-bit »

RSH!
I am downright proud of you! Given a short period of time, you have created a script that can be used, when clicked on, to load an SFS containing an application or game and start said application or game.
And upon exiting that application or game having the SFS unload.
And all of it is very fast in execution.
So to me, you have a Pearl of a script there that should be very useful to anyone using it.

I am picturing gamers with a bunch of games in SFS format being able to use the script modified for each game, renamed as a loader for the game, and assigned an icon even.

And that is not to say that other applications cannot use it either.
It saves having to have a bunch of SFS files loaded to be able to use the applications in each one.
I know because I have a number of them loaded.

So again, Good Job! Be sure to make that available to Puppy users.
I am sure they would also love it.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#25 Post by RSH »

RSH!
I am downright proud of you!
Thank you very much. That's a surprise to me. :)
a script that can be used, when clicked on, to load an SFS containing an application or game and start said application or game.
And upon exiting that application or game having the SFS unload.
And all of it is very fast in execution.
Just, what you've asked for. :)
So to me, you have a Pearl of a script there that should be very useful to anyone using it.
Maybe, a small one, a very small one. :wink:
And that is not to say that other applications cannot use it either.
Should be usable for any application that runs in puppy. 8)
It saves having to have a bunch of SFS files loaded to be able to use the applications in each one.
I know because I have a number of them loaded.
Me too. Sometimes 50 of them and up. :D
I am picturing gamers with a bunch of games in SFS format being able to use the script modified for each game, renamed as a loader for the game, and assigned an icon even.
Can you imagine the following?

- do a right-click on a sfs
- getting a gui to set some preferences

Preferences would be

- copy script to sfs location
- run the script (application) only in pupmode=5
- copy .desktop file and icon into the running system
- replace the "Exec=" entry of the .desktop file with the scripts name and path
- create a desktop button (icon automatically assigned)
- define a user script to run at first
- define a link to download the sfs (like a link to the devs dirs at smokey01.com)
- detect and keep the md5sum for md5sum-check after downloading the sfs

After exiting the gui with 'OK' it would build a RunScript which would execute each and every action, one has set the preferences for.

Method (Right-click a GIMP Image (GIMP not installed)):

- try to run the GIMP
- try to load the GIMP sfs if program can not be executed
- try to download the GIMP SFS if can not be loaded

- after downloading and loading the sfs, run the GIMP
- after GIMP runs, load the Image into GIMP
- work on the Image

All just by a single click on the RunScript, Desktop button or the menu entry.

Wouldn't this be awesome?

LazY Puppy's SFS P.L.U.S. can do all of this!

I currently can run 442 RunScripts of 442 Programs in 286 SFS Files, all by the RunScripts, all without a save file and it works no matter if the OS comes from /mnt/sda1, /mnt/sdd1/LazY, /mnt/home etc.pp.

For fastest results it needs the SFS Files to put into boot directory

SFS P.L.U.S. 2.0.3 (in the Utilities Section of the Forum) can do most of this.

But your request to unload automatically was something which didn't come to my mind, because my computers do have 1,5 and 2 GB RAM. No need to unload automatically after the application is closed. Might be very useful on computers with small RAM.

So, I will take this, refine it and put it into the LazY Puppy SFS P.L.U.S. (and later into the 2.0.3 Version).
So again, Good Job! Be sure to make that available to Puppy users.
I am sure they would also love it.
Thanks again. As you can see: it's almost already there. :D
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

Post Reply