How to make SFS replace a file????

Using applications, configuring, problems
Message
Author
User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

How to make SFS replace a file????

#1 Post by Moose On The Loose »

When I include an SFS, it appears that the additional SFS can add a file to the system but it can't replace a file that is in the system.

In this case, i have a SFS with google chrome in it that I want to add to my frugal installed system. The files appear but the "defaultbrowser" doesn't get replaced by the new one.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

You need a sfs loader that adds the sfs above the other sfs's but that's no good to you if you are making a package for others to use so no point in me giving you it.

I believe the one used can run a script (daemon/profile ?) after loading but I don't know the details. Examine the script of the sfs loader...I did look but was a year or 2 ago.

Mike

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#3 Post by Ted Dog »

well I have a sloppy remaster method posted over the years that would do that. search for it. code is cut and paste from the thread. search for sloppy remaster and my name to locate. I use it for multisession dvds but others reuse same code to remake customized main sfs file for the method you boot.

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#4 Post by Moose On The Loose »

Ted Dog wrote:well I have a sloppy remaster method posted over the years that would do that. search for it. code is cut and paste from the thread. search for sloppy remaster and my name to locate. I use it for multisession dvds but others reuse same code to remake customized main sfs file for the method you boot.
I think I found some of what you are talking about. It is obvious that I need to do some thinking. It would not be good to mess this sort of thing up as it could cause the system to be stuck.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#5 Post by Ted Dog »

not really just save a copy off orginal sfs. The other mounted sfs files must be in /mnt or /tmp so you do not double up with a sfs inside a sfs as a sfs file.
I setup my network passwords, host file, install my favorite card game pet, and add the add-ons for seamonkey browser, and flash and any video players if needed after all this I run the code to sloppy remaster the main sfs and use that new customized version which I burn to DVDs. However other used this for frugal install.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: How to make SFS replace a flile????

#6 Post by MochiMoppel »

Moose On The Loose wrote:The files appear but the "defaultbrowser" doesn't get replaced by the new one.
That's exactly how it should be. Why should a newly installed application make itself the default? If the sfs works fine and this is your only problem I suggest that you switch the defaultbrowser via a small script., something like
sed -i 's|exec [-/a-z]*|exec /path/to/newdefaultbrowser' /usr/local/bin/defaultbrowser
Replace red part with path of the browser you want to make the default.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

Hi Moose; My Puppy-5.4.X.5 Precise has: [Menu] > [Setup] > [Default Applications Chooser]

Other than that, you could always make a AppDir / RoxApp out of it so it`s a no-install app.
I have one of Chrome-24, it wasn`t too hard to make. I also have Chromium-30.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#8 Post by mikeb »

Hi RSH... this is an example of the layering problem I mentioned
mike

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#9 Post by sunburnt »

mikeb; Is this a disguised plug for no-install apps.? :wink:

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#10 Post by mikeb »

Not really... he was not quite sure what difference the layering order made and here was a good example which I was linking to.
Its one of those puppyisms that is generally accepted as how it is when in fact its a design blob.
Other than that, you could always make a AppDir / RoxApp out of it so it`s a no-install app.
that's a plug .... :D

mike

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#11 Post by sunburnt »

I know... I know... And as you say, there`s sooo much that needs fixing with Puppy.

It brings one to the frame of mind to step back and decide if there isn`t a better overall setup.

Only slightly hijacky... It`s topic related so I don`t feel too bad.
Last edited by sunburnt on Sat 30 Nov 2013, 19:39, edited 1 time in total.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#12 Post by mikeb »

It brings one to the frame of mind to step back and decide if there isn`t a better overall setup.
well there are... so why not incorporate such improvements.... I get accused of resisting change yet I see the need for it all over.

Anyway bit of a topic hi jack so will let others get on with their business

mike

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

Re: How to make SFS replace a flile????

#13 Post by Moose On The Loose »

MochiMoppel wrote:
Moose On The Loose wrote:The files appear but the "defaultbrowser" doesn't get replaced by the new one.
That's exactly how it should be. Why should a newly installed application make itself the default?
If I make an SFS complete with a built in web browser as an add on, it sort of undoes the whole purpose to have the user see the old thing that suggests you need to download a browser.

If I include about 50 other improved things, the same sort of thing applies to each one of those.
[...]
If the sfs works fine and this is your only problem
The SFS does work great except for this same issue several times. This, however is not my only problem. I am also losing my hair, but that is way off topic.
I suggest that you switch the defaultbrowser via a small script
The small script option has occurred to me, however it is far from a clean solution as it uses up personal save file space for each one of these I have to do. I may go ahead with the small script version adding the script to the profile.d to make it happen on stable boot but before the desktop.
., something like
sed -i 's|exec [-/a-z]*|exec /path/to/newdefaultbrowser' /usr/local/bin/defaultbrowser
Replace red part with path of the browser you want to make the default.
The script I will use is more like:

Code: Select all

#!/bin/bash
if test -e /tmp/moose_2013_dec_1/defaultbrowser ; then
  mv /tmp/moose_2013_dec_1/defaultbroswer /usr/local/bin/defaultbrowser
else
  rm /etc/profile.d/moose_2013_dec_1
  fi
Moving the file makes it gone on the second boot. Gone on the second boot causes the script to be gone on the 3rd. This way:

1) A failure to properly shut down if protected against

2) Hopefully if the issue of deleted files reappearing is happening,
both the script and the defaultbrowser will have it together.


This way, once the move is done, the code

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#14 Post by sunburnt »

Moose; Don`t you think of a AppDir / RoxApp as a solution.?
The reality is that it solves the union shadowing problems that Puppy has always had.
And it also solves any possible library conflicts that`re a semi common Puppy problem.
I`m looking at making another of these apps., if you want help I`ll be glad to assist you.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: How to make SFS replace a flile????

#15 Post by MochiMoppel »

Moose On The Loose wrote: The small script option has occurred to me, however it is far from a clean solution as it uses up personal save file space for each one of these I have to do. I may go ahead with the small script version adding the script to the profile.d to make it happen on stable boot but before the desktop.
You don't need pupsave file space - would be minor anyway. Just an idea: Can't you put your script into the SFS file? Either into /etc/profile.d or /root/startup? The script would reside on the SFS layer, so it would exist and run only when the SFS is loaded. Nothing to move, delete or check.
Moving the file makes it gone on the second boot. Gone on the second boot causes the script to be gone on the 3rd.
:lol:

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#16 Post by mikeb »

The reality is that it solves the union shadowing problems that Puppy has always had.
yes what a dumb distro...why not just copy how slax layers then the problem disappears...

mike

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#17 Post by Moose On The Loose »

sunburnt wrote:Moose; Don`t you think of a AppDir / RoxApp as a solution.?
The reality is that it solves the union shadowing problems that Puppy has always had.
And it also solves any possible library conflicts that`re a semi common Puppy problem.
I`m looking at making another of these apps., if you want help I`ll be glad to assist you.
The SFS that is giving me the direct layering problem is one that I am making for my own use. The idea is that I can put all of my favorite stuff into it and add it to the list of SFSs to be loaded at boot and have a system that with a totally new save file is just like I want it. This way, the system is very easy to take back to the "how I want it" state. All the pets I loaded to put in all the things I want will be part of the SFS. The save file is then just the changes from that point.

If the AppDir / RoxApp can be made to do this, I am very interested.

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

Re: How to make SFS replace a flile????

#18 Post by Moose On The Loose »

MochiMoppel wrote:
Moose On The Loose wrote: The small script option has occurred to me, however it is far from a clean solution as it uses up personal save file space for each one of these I have to do. I may go ahead with the small script version adding the script to the profile.d to make it happen on stable boot but before the desktop.
You don't need pupsave file space - would be minor anyway. Just an idea: Can't you put your script into the SFS file? Either into /etc/profile.d or /root/startup? The script would reside on the SFS layer, so it would exist and run only when the SFS is loaded. Nothing to move, delete or check.
The script exists entirely to check and to move. This is what uses the space and not the script. I have a partial solution to the space consumption issue and the beginnings of the answer to the unclean issue.

Space reduction:
The replacement parts go in a different path than the normal ones and the script does a ln instead of a move. It then can check for the ln having been done before doing it again. The size of the link is small.

Cleaner version:
The script adds another script to init.d. Because this script got added, it will exist even if the SFS is unloaded. It can then detect that the ln has been done and points to a thing that is no longer in the system. If it discovers this, it can reach in slightly rudely and delete the "whiteout" information for the link in question and then suggest a reboot.

I still really don't like it but if the AppDir / RoxApp can't solve it, I may go down this path. When / if I figure it out, I may make a tool for others to use for this same purpose. (See other reply for what the purpose is)

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#19 Post by sunburnt »

An AppDir with many apps is the idea behind my AppPkg version of AppDir.
This would take going through each app and making it work in the AppDir.
Usually this isn`t too much trouble, some can be a real pickle at times.

What apps are in your SFS.? And it sounds like there`s some system files in it too.

Keep in mind my thoughts about apps and that there`s always a new one coming along.
So making the AppDir packages separately allows easy swapping out and merging of them.

A bare Puppy with utilities only, so it stays the same, while the apps are changed constantly.
.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#20 Post by sunburnt »

Hey Moose; I`ve been trying to get a Chrome or Chromium AppPkg working.
It`s been such a mixed bag between web sites and SFS file problems.

# I`m hoping I can get a Chrome AppPkg uploaded to ally`s site.

# I made a Firefox-23 Virtual AppPkg here:
http://www.murga-linux.com/puppy/viewto ... 061#741061

# I`m wondering if you made a smaller SFS file with the apps that work.?
This is the first step to accomplishing what you want.

Post Reply