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
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

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

#1 Post by 8-bit »

When one creates a multi-session version of Puppy on a CD/DVD, where does one store the SFS files one may want to load?
Since mnt/home would be the root of the optical drive, I am just curious as to how one does this.
And this is also directed to Flash as he seems to have more experience with running multi-session with no hard drive.

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

#2 Post by Flash »

I haven't tried to use a sfs file. I think I'd start by putting it on the root of the (rewritable) DVD, using Pburn. In other words, burn it as a session. Then you can mount the DVD and see the sfs file to use it.

I think your question has been asked in the forum before, but I didn't pay much attention. I can't think why. Perhaps it was off-topic for the particular thread where I saw it.

Jasper

#3 Post by Jasper »

Hi,

I keep all my sfs files on a USB stick formatted as ext4.

However, if you want them on your CD or DVD - if you put
them in your "archive" directory they will not be auto-
loaded into RAM , but can be accessed for individual
use when needed.

My regards

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

#4 Post by 8-bit »

The way I understand that SFS-Load-on-the Fly works, it looks for SFS files in the install subdirectory for a frugal install and also /mnt/home.
How does one get it to recognize SFS files on some other device?
I ask because I have never tried to load SFS files from other than those locations.

Also, when I posted this new post, I put it in the section for regular users.
I have made other posts that have also been moved from one section of the forum to another.
My question is to why the post was moved as the section I posted it in seemed to be the right one.

Jasper

#5 Post by Jasper »

Hi,

You find the sfs files (on a mounted drive/partition, USB,
CD or where you put them) and then right click on any sfs
file you want to load (and right click again to unload).

Flash doubtless moved your thread here as this is the
specialised multi-session section, but ..........

My regards

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

#6 Post by Flash »

Your post seemed specific to multisession, so I moved it to the multisession section of the forum. That way, all the threads that have to do with multisession Puppy are in one place for easy reference. Make sense?

By the way, yours is an important question which apparently hasn't been answered definitively for multisession users. It needs to be solved. :)

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

#7 Post by Flash »

Referring to this thread, would RSH's solution be needed to use sfs files on a multisession DVD, or is there a simpler way?
As I understand it, .pet files are the same as .sfs files, only slightly different. :D One solution would be to convert the .sfs files you want to use to .pet files (directions in a recent thread somewhere in the forum) and put them in their own directory (labeled perhaps "pet files") on the multisession DVD. Whenever you want to use a .pet, you'd mount the multisession DVD, go to the "pet files" directory and click on the particular .pet you wanted to use, to install it. I am certain that would work because it is very similar to how I already do things. The difference is that I put the .pet files in a USB flash memory that I leave plugged into the computer and mount when I want to use it. Putting them on the multisession DVD would make them more convenient if you carry the DVD around with you.

Jasper

#8 Post by Jasper »

Flash and 8-bit,

Put the sfs files anywhere but your CD/DVD, Then right click
on the one you want to load and for load-on-the-fly either left
click or right click sfs_load (as the mood takes you).

They can be unloaded using exactly the same method, though
they will automatically be lost on shutdown or reboot
regardless of any save.

If you want the sfs files on your multisession CD/DVD then
save them there, but either put them in the "archive" or
add them using Pburn in the same way as you could add
any files - without having them loaded into RAM on booting.

Just try it. I only use multi-session and the above works
perfectly, but I actually use seaside's sfs Tray and Exec.

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

#9 Post by RSH »

Hi.

@Flash

Have you noticed my PM to you? It's an urgent request for the German forum. Thanks.

@All

To load SFS files from cd it is not needed to use this here solution. This is only for loading a specified sfs file at boot up, so you can use the applications right after X is loaded.

Usually it should work to load sfs files from cd/dvd using shinobar's sfs_load. But there's a small issue. Shinobar's sfs_load "complains" the location of the sfs to load, if it is on cd/dvd and it wants you to choose what to do and/or where to copy the sfs file/s.

Since it's not really needed to copy the sfs file (one can choose NO COPY) it's a bit uncomfortable - I think.

In Germany the LazY Puppy is now used on school by a German teacher for CNC and CAD etc.pp.. He wants to use the LazY Puppy also from cd/dvd, but wants to run the applications by the RunScripts created by LazY Puppy's SFS P.L.U.S.

The RunScripts do use some special commands for sfs_load, to be able to run the application just by a single click (on menu entry, desktop icon or RunScript) without to have to click any GUI after this.

Code: Select all

sfs_load --cli --skip-fixmenus --quiet NameOfSFS.sfs
--cli means command line interface
--skip-fixmenus means, fixmenus will not be executed after the sfs is loaded (shinobar did introduce this command especially for LazY Puppy by a request of mine)
--quiet means don't show a GUI or Information GUI

But if the sfs is on cd/dvd it still brings up the "Copy GUI".

To solve the cd-dvd-copy-gui-problem, I have made some modifications on sfs_load 1.3.9 (which is also still installed in LazY Puppy as lazy_sfs_load) and we can now run applications from sfs from cd/dvd without the need to run sfs_load manually or to click any gui - just by the RunScripts, which will be executed by the menu entries etc.pp.

The RunScripts, created by SFS P.L.U.S. do now have about 300 lines of code and can download the sfs to the boot directory, load the sfs and execute the application just by a single mouse click on the menu entry etc. pp.

But the basic script for all of this has been a simple 8-liner bash script. I have made a commented and example extended version for you. The attached file is a fake .gz file, so, remove the gz and make it executable.

It is set for the use of fotoxx and the LP2_Fotoxx87.sfs. Just change these settings (editing the parts inside the script) for the use of your preferred sfs and application. It will then load the sfs and execute the application after the sfs is loaded.

I have made a request at shinobar's sfs_load thread for a command to disable the "copy GUI" by a script used command, but he didn't reply so far.

So, you have to click the "copy GUI" away (choose NO COPY) until there is a solution. Or, if wanted, I can send you the lazy_sfs_load to use this here without to click any GUI.

RSH
Attachments
simple-run-script.gz
remove .gz and make executable
(1.17 KiB) Downloaded 1218 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

#10 Post by 8-bit »

I just tried the simple-run-script (edited) to run /mnt/home/paintown-3.5.0_sfs4.sfs.

I had no joy when trying to run it from a command line with the following results.

Code: Select all

# ./simple-run-script
dirname: invalid option -- 's'
Try `dirname --help' for more information.
grep: invalid option -- 'k'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- 'k'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
find: File system loop detected; `/initrd/mnt/dev_save/.mozilla/.mozilla' is part of the same file system loop as `/initrd/mnt/dev_save/.mozilla'.
find: File system loop detected; `/initrd/mnt/dev_save/link-to-.mozilla/.mozilla' is part of the same file system loop as `/initrd/mnt/dev_save/link-to-.mozilla'.
grep: invalid option -- 'k'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
sfs_load: '-skip-fixmenus.sfs' seems not registered.
grep: invalid option -- 'k'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
cat: /tmp/sfs_load/sfs_load_tmp.txt: No such file or directory
sfs_load: Could not find the loaded point.
./simple-run-script: line 29: paintown: command not found
#
So maybe I have other problems.
You also might have noticed that the sfs_load option of "-skip-fixmenus" did not work.

I did this as a test in Puppy Lucid 520 frugal install.

Also, I run Seamonkey and I had removed the hidden /root/.mozilla directory and then created a link to /mnt/home/.mozilla directory so I could use all my Seamonkey settings in any version of Puppy by making a system link to the .mozilla directory in /mnt/home.

So I do not know how that jumped into execution of the simple-run-script!

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

#11 Post by RSH »

Would you please send me your changed script?

Do you use sfs_load 1.9x for this. Earlier version do not have the --skip-fixmenus command.
[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

#12 Post by RSH »

Checked again the attached script. Works!

Terminal output for Fotoxx and its SFS file:

Code: Select all

sh-4.1# /root/Downloads/simple-run-script
PMEDIA=atahd
DoNoCopy=false
lazy_sfs_load: SUPPORTSIG=green, SFSMODE=tmp, DESTPART=sdd1, DESTDIR=/mnt/sdd1;
lazy_sfs_load: TFREE=2795248
lazy_sfs_load: RFREE=5543512
lazy_sfs_load: FILEISAT=home;
lazy_sfs_load: Möchten Sie 'LP2_Fotoxx87.sfs(Dateigröße: 4MB)' laden?\nSie können SFS-Dateien zum temporären Gebrauch laden.
lazy_sfs_load: EXTRASFS=/mnt/sdd1/LazY/LP2_Fotoxx87.sfs
lazy_sfs_load: '/mnt/sdd1/LazY/LP2_Fotoxx87.sfs'(/dev/loop10) is mounted on '/initrd/pup_ro10'.
lazy_sfs_load: 'LP2_Fotoxx87.sfs' ist erfolgreich geladen.
Entfernen oder verschieben Sie die Datei nicht, solange sie nicht entladen wurde.


sh-4.1# fotoxx v.8.7  2009.11.25
language: de_DE 
using 2 threads 
FreeImage 3.10.0 
exiftool 7.89
ROX-Filer 2.9
Copyright (C) 2005 Thomas Leonard.
ROX-Filer kommt OHNE JEGLICHE GARANTIE,
soweit es das Gesetz erlaubt
Sie dürfen Kopien von ROX-Filer weiterverteilen
nach den Bestimmungen der GNU General Public License.
Für diesbezügliche weitere Informationen, siehe die Datei COPYING.

Kompiliert mit GTK Version 2.14.7
Läuft mit GTK Version 2.20.0

-- Eigenschaften, die beim Kompilieren festgelegt wurden --

Unterstützung für große Dateien... Ja
Inotify support... Ja
Dnotify-Unterstützung... Nein
Binärkompatibilität... Nein (apsymbols.h nicht gefunden)
Extended attribute support... Ja
ufraw 0.16
EXIV2 0.19
JPEG enabled.
TIFF enabled.
FITS disabled.
ZIP enabled.
sh: printoxx: command not found
sh: /usr/bin/printoxx: No such file or directory
Please, send me your script to check out.

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
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#13 Post by 8-bit »

First, the version of SFS load I have has this as at the beginning of the script.

Code: Select all

# sfs_load 28 Jan 2011 by shinobar
# some code from the otf_sfs_loader by goingnuts, the sfs_installation.sh by 01micko and scrips by Barry
# 29 Jan 2011 v0.2: fix under RAM mode (PUPSAVE=5), multisession CD support (PUPMODE=77)
# 30 Jan 2011 v0.3: unionfs mount option, fix menu update after unload
#  4 Feb 2011 v0.4: fix was pulldown failed, confirm before move, do not support unionfs other than aufs
#  5 Feb 2011 v0.5: fix was sfs removed from the list even unload failed, search smaller number if pup_roN is not available, fix typo ZDRBASE
#  9 Feb 2011 v0.6: fix was moved remote files, restart X info, launcher (thanks to seaside)
# 11 Feb 2011 v0.7: fix ws not update menu in some case, see aufs even with no module(thanks to jemimah), add new loop device
# 14 Feb 2011 v0.8: warning excessive extra files, restart main dialog, cleanup whiteout at unload(thanks to jpeps and jemimah), mkfontscale, mkfontdir
# 23 Feb 2011 v0.9: improve compatibility under PUPMODE=6 (thanks to mavrothal) and PUPMODE=77
# 23 Feb 2011 v0.9: persistent loading excessive sfs after reboot(idea from jamesbond), main dialog layout(thanks to jamesbond)
# 23 Feb 2011 v0.9: glob pattern file neme, puppypin
# 15 Mar 2011 v1.0: again PUPMODE=5/6/77
# 17 Mar 2011 v1.1: load/unload under PUPMODE=5, launcher
And the modified simple-run-script is

Code: Select all

#!/bin/bash
#------------------------------------------------------------------------------
# Basic RunScript, first step of the LazY Puppy SFS P.L.U.S. RunScripts
# Edition for the murga forum users to use this on cd/dvd
# 2012-12-07 RSH
#------------------------------------------------------------------------------
# Note: adding the path to the sfs name increases the speed of loading a sfs
#------------------------------------------------------------------------------

# If paintown exits
if [ "$(which paintown)" ]; then
	
	# Execute paintown
	paintown &
	
	else
	
	# Examples to show results of the use of sfs_load using different commands
	#sfs_load "LP2_Fotoxx87.sfs"
	#sfs_load --cli "LP2_Fotoxx87.sfs"
	#sfs_load --cli --skip-fixmenus "LP2_Fotoxx87.sfs"
	#sfs_load --cli --skip-fixmenus --quiet "LP2_Fotoxx87.sfs"
	
	# Load the 'paintown-3.5.0_sfs4.sfs'
	sfs_load --cli --skip-fixmenus --quiet "/mnt/home/paintown-3.5.0_sfs4.sfs"
	# Note: adding the path increases the speed of loading a sfs
	
	# Execute paintown
	paintown &
	
fi

exit 0

#------------------------------------------------------------------------------
# End
#------------------------------------------------------------------------------

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

#14 Post by RSH »

Hi 8-bit.

1. Is this

Code: Select all

# 17 Mar 2011 v1.1: load/unload under PUPMODE=5, launcher
the last entry of this sort of entries on top of the sfs_load script? If so, then you do have sfs_load 1.1 installed. Must use 1.9 and above for this. I don't know anything about 1.1!

2. The script seems to be OK so far (make sure "paintown" is in /usr/bin or /usr/sbin; otherwise add path to the name). To check this, left-click the sfs and have a look into these directories.

3. Question: as far as I know, if running from cd/dvd there is no /mnt/home. If I run from cd/dvd there is /mnt/sr0.

4. Try to run the script without the path. Use only the sfs file name. What happens?

Not to forget: use sfs_load 1.9 and above for this.
[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

#15 Post by 8-bit »

I was using my hard drive and files there instead of a SFS on a multisession optical disk.
I will see about getting and installing an updated version of sfs_load and try again.
Thanks for the reply.
I just tried installing SFS_load v 1.4 and that did not work either.
So I uninstalled it and installed sfs_load-1.9.6.pet.
Now I have a successful test on the simple-run-script that I modified.
The only thing I can think that it would be nice is a modification of the script to unload the same SFS file it had loaded when the application it ran was closed.
That way, one would have a script that would load an SFS file, run the application, and upon exiting the application, unload the same SFS file.

Mind you, that is just a thought.
And that way, one would not have to have a bunch of SFS files loaded all the time to use some applications that are in SFS format.

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]

Post Reply