xeroye2038 wrote: ↑Fri Jun 25, 2021 3:38 pm
My question is, How to create custom .sfs file for jq (JSON parser) and mpv's config files, so it would work when loaded?
also is there a way to load it into ram at boot? Thanks again.
Tackling the last question first. I'm not sure I know what you mean. If you are running a Frugal Puppy with a SaveFile/Folder, executing a Save while an SFS is loaded should result in it being automatically loaded on bootup. Saves preserve your current settings. If you want the application to open as soon as you boot, you can drag either its desktop or executable [may vary with the applications, so experiment] into /root/Startup and preserve that setting by Saving.
Creating a link in /root/Startup applies without regard to any other hoop you may have to jump thru to get your system to use the application.
If you mean that you want to have an application available and open without employing a SaveFile/Folder you'll either have to remaster or employ the save2sfs module of nicOS-Utitlity-Suite, viewtopic.php?p=12983#p12983. That module will convert a SaveFile/Folder and/or just your current configuration into an adrv.sfs or a ydrv.sfs either of which are automatically used by Puppys on bootup. But they won't include applications.SFSes.
I'm pretty sure both the remaster module of that Suite or shinobar's remaster-x, https://oldforum.puppylinux.com/viewtop ... de#p780345 lack that capability.
AFAIK, to have an application available and open on boot-up when not using a Save/File folder you'll have to employ some structure other than an SFS. Not much is lost as the main advantage of an application.SFS is that you can unload it. Rather than creating an SFS, use or create a pet and install it before remastering or using Save2SFS. [If you know where all an application's files belong, you can just put them in their proper places rather than creating a pet].
To create a pet from an SFS:
(1) Create a folder --with an appropriate name-- to hold the files, e.g. my-toy.
(2) Left-Click the SFS and select "View Contents".
(3) From the window which opens, Left-Press, hold, then drag all its files and folders into your "my-toy" folder.
(4) Left-Click the SFS again to unmount it.
(5) Right-Click the "my-toy" folder and select "Create a pet package". If that's not on your Right-Click menu, open a terminal in "my-toy"'s parent folder and type the command: dir2pet my-toy -- or whatever name you gave the folder.
The second disadvantage with not using SFSes is that the libraries and instructions required by one application may conflict with those required by another. Unloading SFSes can avoid that. But installing a pet may over-write that which is needed by another application. There may, however, be a couple of solutions:
Rather than creating a pet, once you have your 'my-toy' folder populated, you might create an AppImage, viewtopic.php?p=3250#p3250. You can place that AppImage in /opt together with appropriate links and files to create menu entries, and link into /root/Startup. [IIRC, MikeWalsh has a post somewhere detailing that].
The other alternative is, again locating it in /opt, place the extracted SFS Folder there together with a launcher script compelling the application to look only within its own folder for libraries. [If you examine an SFS-loaded libreoffice, you'll find almost all of its files are in a folder in /opt. And examination of fredx181's and MikeWalsh's portable applications --particularly firefox's 'ff' script, or a Google-Clone's chrome-pup script-- you'll see what I mean]. But, unfortunately, I haven't yet gotten my head around that concept.
In case you've gotten lost, all the above is done before you remaster or create a ydrv-or-adrv using Save2SFS.
About having an application's settings/configurations load on boot-up --again assuming that you aren't employing a SaveFile/Folder -- you may have to isolate those and copy them to be used as explained below.
[There might be a way to 'lock in' your preferences with some remaster application, but I don't know. It's been quite awhile since I've done a remaster: the Save2SFS module is easier to use, quicker, and accomplishes everything I want. And when doing remasters my intent was to publish for other to use so I wasn't concerned with preserving settings and configurations unique to my system and aesthetics.]
'Locking in' your setting may depend on where those settings are located. Save2SFS preserves some, but not all. But, as that is the easiest way to proceed, try it first. However, rather than deleting the files a new adrv or ydrv replaces --i.e., the old adrv and/or ydrv and the SaveFile or Folder-- move them to where they would NOT be loaded but remain available if you have to revert.
The default setting for libreoffice writer is to italicize everything after you press the / key. That makes a mess out of trying to communicate "/root/my-applications/bin". To avoid this I do the following:
Load LibreOffice. Change its settings. Execute a Save. The contents of a SaveFile/Folder have priority over those of an Application SFS. Unload LibreOffice. Your settings are still in the SaveFile/Folder --they are not unloaded. So when you Save2SFS they become part of your adrv/ydrv and still have priority over the loaded SFS. I think the same will apply if you extracted LibreOffice and located it in /opt. LibreOffice writes its settings to /root/.config/libreoffice which is preserved by Save2SFS.
Another way would be to SFS load an application, make your settings changes, then copy the files and folders containing those changes into their corresponding locations in the --for example-- 'my-toy' folder you created to repackage your application.
Most settings are written to either a specific application in /root or /root/.config. Note the '.'/dot indicating a hidden file. Click Rox's 'Eye' to see them. Before making your settings changes open two rox windows (with hidden files shown) to /root and /root/.config so that you can see if your application writes its settings to either.