Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 19 Apr 2014, 15:58
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge » Multi-session live-CD/DVD
How to add SFS files to a multisession CD/DVD?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [25 Posts]   Goto page: Previous 1, 2
Author Message
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Fri 07 Dec 2012, 17:18    Post subject:  

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.



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:
choosepart $TOPART || finish

to
Code:
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
simple-run-script-b.gz
Description 
gz

 Download 
Filename  simple-run-script-b.gz 
Filesize  1.7 KB 
Downloaded  389 Time(s) 

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3280
Location: Oregon

PostPosted: Fri 07 Dec 2012, 19:25    Post subject:  

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.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Fri 07 Dec 2012, 20:10    Post subject:  

Quote:
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...

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Fri 07 Dec 2012, 21:21    Post subject:  

AutoUnload SFS works. But for some unknown reasons the application starts twice now. Got to find out...
_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Fri 07 Dec 2012, 22:29    Post subject:  

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. Very Happy

The AutoUnload Script removes itself after unloading the sfs! Cool

OK? Laughing

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

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

It's still easy to handle! Very Happy

RSH
simple-run-script-c.gz
Description  As above: remove the .gz and make executable
gz

 Download 
Filename  simple-run-script-c.gz 
Filesize  2.48 KB 
Downloaded  387 Time(s) 

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10666
Location: Arizona USA

PostPosted: Fri 07 Dec 2012, 22:45    Post subject:  

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. Sad

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. Confused
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Fri 07 Dec 2012, 23:09    Post subject:  

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. Very Happy Cool

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

RSH

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Sat 08 Dec 2012, 01:02    Post subject:  

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. Cool

SFS is unloaded automatically when last instance of program is closed. Very Happy

RSH
simple-run-script-d.gz
Description  as usual: remove the .gz and make executable
gz

 Download 
Filename  simple-run-script-d.gz 
Filesize  2.64 KB 
Downloaded  397 Time(s) 

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3280
Location: Oregon

PostPosted: Sat 08 Dec 2012, 03:21    Post subject:  

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.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Sat 08 Dec 2012, 04:55    Post subject:  

Quote:
RSH!
I am downright proud of you!

Thank you very much. That's a surprise to me. Smile

Quote:
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. Smile

Quote:
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

Quote:
And that is not to say that other applications cannot use it either.

Should be usable for any application that runs in puppy. Cool

Quote:
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. Very Happy

Quote:
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).

Quote:
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. Very Happy

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [25 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge » Multi-session live-CD/DVD
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0726s ][ Queries: 13 (0.0050s) ][ GZIP on ]