Page 1 of 1

Unloading .sfs stays put in spot?

Posted: Tue Dec 20, 2022 10:11 pm
by houndstooth

Is this predictable behavior?:

If I load a .sfs designed to run in spot, sfs_load will permit unloading, which seems to work, but the files remain & the app still runs.

If I know the .sfs composition I delete manually, but curious why the spot directory will preserve an .sfs.


Re: Unloading .sfs stays put in spot?

Posted: Tue Dec 20, 2022 11:35 pm
by Feek

I usually put .sfs files to /mnt/home.

If it is loaded using the sfs load program, it creates another layer in the file system.
If the loaded app is designed to run as spot, then anything created by that app is restricted to the spot folder (e.g. a config file in /home/spot/.config folder).
If the .sfs is unloaded, the layer is gone and the program should no longer run.
The .sfs file is sitting in /mnt/home the whole time and it should not be tampered with in any way if it is loaded into the file system.
However, content created by the app (e.g. a config file) is not lost by unloading the .sfs.

Sometimes it happens that when unloading an app a warning message appears that the app can not be unloaded (because some processes are still running). Then restarting of X sometimes helps. Any loaded sfs files should be automatically unloaded on reboot or shutdown.


Re: Unloading .sfs stays put in spot?

Posted: Wed Dec 21, 2022 7:24 am
by bigpup

What Puppy version you using?

Where is the SFS file located?

What SFS file is it?


Re: Unloading .sfs stays put in spot?

Posted: Thu Dec 22, 2022 1:49 am
by houndstooth

@Feek the nature of /home I've yet to comprehend save Puppy system organization becoming more Ubuntu-like.

/home/spot looks like it's mirroring /root/spot, but why?

This post is referencing pre /home directory pups.

@bigpup the .sfs in question is just a browser. In Fossa it appears loaded by sfs_load but is not visible in a file manager or by terminal while still unloading smoothly.


Re: Unloading .sfs stays put in spot?

Posted: Thu Dec 22, 2022 2:22 am
by rockedge

@houndstooth are you sure that the browser package that can't seem to be removable isn't in the adrv SFS or ydrv SFS in the root file system and is loaded during system boot?


Re: Unloading .sfs stays put in spot?

Posted: Thu Dec 22, 2022 3:56 am
by houndstooth

@rockedge I probably could have been clearer.

I am not intending an .sfs merely run as user spot, but from the /root/spot directory.

It's not a duplicate of a system .sfs but running from spot, akin to an app in /root/my-applications.

Perhaps all apps should reside in system directories & simply run as user spot, but that is a new level of understanding.


Re: Unloading .sfs stays put in spot?

Posted: Thu Dec 22, 2022 11:32 am
by bigpup

You have the SFS in the wrong place in the file system and your understanding of the spot directory needs to be cleared up.

In the browser enter this in the address.
file:///usr/share/doc/root.htm

This will open the info file that will explain spot.


Re: Unloading .sfs stays put in spot?

Posted: Fri Dec 23, 2022 5:49 am
by houndstooth

@bigpup if you put an app in the spot directory, it should run as user spot by default, no?

That's the goal.

The other alternative appears to be the necessity of deliberately choosing spot by startup setting, if applicable, or run-as-spot.

or:

Code: Select all

root# su spot
root$ [command]

:?:


Re: Unloading .sfs stays put in spot?

Posted: Fri Dec 23, 2022 5:38 pm
by mikeslr

Keep the following in mind: "Puppys Run in RAM". On boot-up a Puppy copies some files-systems into RAM-Cache, mounts your SaveFile/Folder and creates an index in RAM as to where each file is, then --when necessary-- follows that index to copy a file into 'RAM-Work-Space' when it is needed. When you execute a SAVE --or it happens automatically if your system does automatic Saves-- whatever changes were made are written to your SaveFile/Folder on Storage. So 'Home' is actually two places: one in RAM and one on Storage. If you have files in /Home when a Save is executed, they will be written to /Home in storage and on next boot indexed as being in /Home.

Exactly which web-browser are you using? You've mentioned an SFS. The location of an SFS --even one running as Spot-- should not be in the Home Folder. Depending on which Puppy (which Puppy?) it can always be on the same partition as Puppy (where SFS-Load will find it) but some Puppys will also look within their own folder. A web-browser running as spot is designed to limit downloads to the /spot folder and uploads from the /spot folder. See this post and its link to get files out of and into the /spot folder. viewtopic.php?p=63940#p63940.

But with a SFS you've inadvertently located in and SFS-loaded from the /spot folder I think you have to do the following: File-Browse to the /spot folder, Right-Click the SFS and select 'SFS-Load'. It's a toggle and you'll be asked if you want to unload. Do so, then move the web-browser out of the /spot folder to where you want it to be. Then execute a Save to have that change persist.


Re: Unloading .sfs stays put in spot?

Posted: Fri Dec 23, 2022 6:17 pm
by mikeslr

I'm confused. You're initial post seem to want to get the SFS out of /spot. You're last post seemed to want to run your SFS from within /spot. Exactly what do you want? By the way, Puppys run as Root. The 'su' command --which in other Linuxes give a User Root privileges-- isn't needed and isn't recognized.

Edit After-thought: Puppys use AUFS, an application by which file-systems are 'merged' in RAM; sort of the way overlays work with graphic applications. You only see the top layer. A web-browser SFS can be created which places the entire* browser in the /home folder within the build. When SFS-Loaded that web-browser's folder in /home on Storage will be copied into the /home folder in RAM. Using the SFS-Load toggle, again, to unload it will remove it from RAM (may require a reboot), but anything downloaded during its use will remain in /home/downloads if a Save was executed. Without a Save, the contents of /home/downloads --only being in RAM-- will be extinguished. RAM is cleared on reboot/shutdown.

-----
* In order for there to be a menu entry with which to start such application requires a /usr/share/application's desktop file with arguments identifying an icon and either an Exec= argument spelling out the path-to and name of the executable, or to a bash-script 'on the path' which spells that out.


Re: Unloading .sfs stays put in spot?

Posted: Sat Dec 24, 2022 12:16 pm
by bigpup
houndstooth wrote: Fri Dec 23, 2022 5:49 am

@bigpup if you put an app in the spot directory, it should run as user spot by default, no?

No.

You are still thinking spot is normally what other operating systems call a restricted user.

Spot is more a restricted way to run Internet programs and control where they can download stuff to your computer.
When selected to run- as-spot
The program can only download to the /home/spot directory.
Internet program will only be able to (normally) edit/create/write files inside /home/spot.

This is mainly for web browsers and controlled by the selections you make in the Login Manager.
the login manager will list programs it finds installed and give option to run as spot.

The other alternative appears to be the necessity of deliberately choosing spot by startup setting, if applicable, or run-as-spot.

run-as-spot is used to make a program, that refuses to run as root user, think it is running as a non-root user.
the program starts, but it is still being run as root user.
If the program is an Internet type program, than run-as-spot is doing the same as selecting to run as spot does, in the Login Manager.


Re: Unloading .sfs stays put in spot?

Posted: Sat Dec 24, 2022 12:52 pm
by bigpup

Looking back at the title of this topic and your first post.

You seem to have the idea that a SFS package will disappear when you unload it.

A SFS package file is not removed.
It is loaded or unloaded into the file system.

When loaded the program in it acts just like it would if it was installed. Has a menu entry, etc.....

When unloaded it is simply removed from the file system.
The SFS package file is still there.
If you left click on the SFS package file, it will load back into the file system, and run.


Re: Unloading .sfs stays put in spot?

Posted: Mon Feb 13, 2023 12:37 pm
by houndstooth

I see two points in your reply. One is spot's restricted download location. The other is the modest trick of using spot for apps like Chromium browsers that resist running as root.

Really my question was just about what makes an app run as spot & what doesn't. There appears to be the command but also setting apps up in the Login Manager. I originally thought spot was restricted to where apps run from there should run as spot by default.

Now it seems .sfs loaded there do not unload, hence they're actually copied.

bigpup wrote: Sat Dec 24, 2022 12:16 pm
houndstooth wrote: Fri Dec 23, 2022 5:49 am

@bigpup if you put an app in the spot directory, it should run as user spot by default, no?

No.

You are still thinking spot is normally what other operating systems call a restricted user.

Spot is more a restricted way to run Internet programs and control where they can download stuff to your computer.
When selected to run- as-spot
The program can only download to the /home/spot directory.
Internet program will only be able to (normally) edit/create/write files inside /home/spot.

This is mainly for web browsers and controlled by the selections you make in the Login Manager.
the login manager will list programs it finds installed and give option to run as spot.

The other alternative appears to be the necessity of deliberately choosing spot by startup setting, if applicable, or run-as-spot.

run-as-spot is used to make a program, that refuses to run as root user, think it is running as a non-root user.
the program starts, but it is still being run as root user.
If the program is an Internet type program, than run-as-spot is doing the same as selecting to run as spot does, in the Login Manager.