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 Fri 24 Oct 2014, 19:24
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to make SFS replace a file????
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
Moose On The Loose


Joined: 24 Feb 2011
Posts: 528

PostPosted: Fri 29 Nov 2013, 16:02    Post_subject:  How to make SFS replace a file????
Sub_title: I have an SFS with a better fiile than the one in the system
 

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.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8365

PostPosted: Fri 29 Nov 2013, 16:27    Post_subject:  

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
Back to top
View user's profile Send_private_message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2368
Location: Heart of Texas

PostPosted: Fri 29 Nov 2013, 16:41    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 528

PostPosted: Fri 29 Nov 2013, 18:56    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2368
Location: Heart of Texas

PostPosted: Fri 29 Nov 2013, 21:30    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 433
Location: Japan

PostPosted: Fri 29 Nov 2013, 22:49    Post_subject: Re: How to make SFS replace a flile????
Sub_title: I have an SFS with a better fiile than the one in the system
 

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.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 30 Nov 2013, 01:32    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8365

PostPosted: Sat 30 Nov 2013, 08:05    Post_subject:  

Hi RSH... this is an example of the layering problem I mentioned
mike
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 30 Nov 2013, 14:10    Post_subject:  

mikeb; Is this a disguised plug for no-install apps.? Wink
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8365

PostPosted: Sat 30 Nov 2013, 15:05    Post_subject:  

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.

Quote:
Other than that, you could always make a AppDir / RoxApp out of it so it`s a no-install app.

that's a plug .... Very Happy

mike
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 30 Nov 2013, 15:21    Post_subject:  

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.

Edited_time_total
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8365

PostPosted: Sat 30 Nov 2013, 15:26    Post_subject:  

Quote:
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
Back to top
View user's profile Send_private_message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 528

PostPosted: Sat 30 Nov 2013, 20:04    Post_subject: Re: How to make SFS replace a flile????
Sub_title: I have an SFS with a better fiile than the one in the system
 

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

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.

Quote:

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.

Quote:

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

#!/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
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sat 30 Nov 2013, 22:17    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 433
Location: Japan

PostPosted: Sat 30 Nov 2013, 23:04    Post_subject: Re: How to make SFS replace a flile????
Sub_title: I have an SFS with a better fiile than the one in the system
 

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.

Quote:
Moving the file makes it gone on the second boot. Gone on the second boot causes the script to be gone on the 3rd.
Laughing
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0855s ][ Queries: 11 (0.0071s) ][ GZIP on ]