How to stop "SAVING TO FILE" at shutdown?

Booting, installing, newbie
Message
Author
nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

How to stop "SAVING TO FILE" at shutdown?

#1 Post by nancy reagan »

"SAVING TO FILE" while I don't want to

Installed Choicepup 412 in superfloppy mode to usb.

First time yes I wanted to save to file because of new programs.

However every next closure it "saves to file" without asking y/n.

How can I stop this unwanted saving ?

Thanks in advance

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#2 Post by Béèm »

This is the way puppy is designed.

But I know that the question has been raised before and advice been given.
Try to find those posts with the puppysearch link in my sig.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

Thanks but

#3 Post by nancy reagan »

Thanks but very hard searching through google.

"Search the forum" impossible to search in quotes.

Yet ..

sidders
Posts: 464
Joined: Wed 23 Jul 2008, 18:47
Location: Bolton, uk

#4 Post by sidders »

Nancy its may be in the etc/rc.shutdown. I modified it for a live/kiosk cd i made to not prompt or save at shutdown. I took out a swathe of code fron line 50 onwards.

I dont know how to achieve this after an initial save though.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#5 Post by sc0ttman »

Open the terminal, type 'geany /etc/rc.d/rc.shutdown' (without the quotes)

then find this line, it should be around line 825 (use search - Ctrl+F)

Code: Select all

/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
The line above is the one the launches snapmergepuppy, comment it out, with a # at the start of the line. So it looks like this:

Code: Select all

#/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
OR, get a dialog, asking you to save or not, at each shutdown.

Code: Select all

#the above are in unionfs at /.
dialog --yesno "Save this session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi 
;;
Then save the file.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

?

#6 Post by nancy reagan »

Thanks for the tips sidders and scott. Even if my stick now is totally ruined and doing first a few jobs on livecd first, I choose to go for Scott's tip.

However being a non tweaker, some new questions arise beforehand ..

I go for the option after "OR", so that on shutdown I have an option.

Q1: Does it mean that I have to a. remove line at approx 825, or b. just rewrite ?

Q2: Howto copy and paste into terminal ?

Thanks again.

sc0ttman wrote:Open the terminal, type 'geany /etc/rc.d/rc.shutdown' (without the quotes)

then find this line, it should be around line 825 (use search - Ctrl+F)

Code: Select all

/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
The line above is the one the launches snapmergepuppy, comment it out, with a # at the start of the line. So it looks like this:

Code: Select all

#/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
OR, get a dialog, asking you to save or not, at each shutdown.

Code: Select all

#the above are in unionfs at /.
dialog --yesno "Save this session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi 
;;
Then save the file.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

Re: ?

#7 Post by sc0ttman »

nancy reagan wrote:Q1: Does it mean that I have to a. remove line at approx 825, or b. just rewrite?
Answer 1: It should be encased in an 'if' command, that checks the dialog result.

So... This is the first line that concerns us.

Code: Select all

#the above are in unionfs at /
This is the last line that concerns us (a few lines below):

Code: Select all

;;
Everything between these lines can be replaced with the following:

Code: Select all

dialog --yesno "Save this session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi
So that you now have:

Code: Select all

#the above are in unionfs at /.
dialog --yesno "Save this session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi
;;
This encases the snapmergepuppy command (which calls the save file) in a dialog.
So now, it is only executed if the user chooses 'yes'
Q2: How to copy and paste into terminal ?
SHIFT+INSERT pastes into the terminal... Still not sure how to copy!
Last edited by sc0ttman on Tue 24 May 2011, 17:10, edited 1 time in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
walter90
Posts: 282
Joined: Wed 26 Aug 2009, 03:53
Location: Pennsylvania, USA

#8 Post by walter90 »

I copied this code exactly and it does work, but from time to time even if I select the save option it does not save. At other times it has terminated the save despite my savefile having more than enough room left. I'd say this happens about 5% of the time.

I am using this code on Puppy 4.2.1, 4.1.2 and 4.30. It seems that 4.30 has no issues with this.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#9 Post by Sylvander »

I have a couple of Puppies...
That load the main files off a "live" optical disk...
And each has a pupsave file on a FAT32 partition, on their own separate USB Flash Drive.

Used the instructions above by scOttman...
To provide the choice at shut-down...
To save or not save the session.
Which is working well. :D

But what about DURING the session?
When changes to the session are COPIED back to the pupsave?

Is it possible to have the choice to allow or prevent this?

adXok
Posts: 68
Joined: Fri 12 Mar 2010, 12:08

Simmilar question?

#10 Post by adXok »

Hi, I am new user of Puppy and my Puppy works like this:

1. Booting form a CD (Puppy 4.3.1 burned image)
2. I had no ext3 or ext2 partitions on my HD so I just plugged a USB flash drive and Saved my session there
3. Every time Puppy boots up it loads form that USB (location sdc1) (if plugged, if not loads defaults in RAM)
4. Now I have made a ext3 partition called (sdb9)

What I want is this:
At reboot or shutdown Puppy to ask me whether to save (or not) the current session to what location (sdb9 with ext3 filesystem) or USB (if plugged and found) so next time to load from that location?

More improtant?
Is it possible at boottime Puppy to ask where to seek for session load-files?

aarf

#11 Post by aarf »

Q2: Howto copy and paste into terminal ?
two ways
1) shift+Ins(ert)
2) highlight text somewhere and then click the middle mouse button in the terminal

User avatar
walter90
Posts: 282
Joined: Wed 26 Aug 2009, 03:53
Location: Pennsylvania, USA

#12 Post by walter90 »

Sylvander wrote:I have a couple of Puppies...
That load the main files off a "live" optical disk...
And each has a pupsave file on a FAT32 partition, on their own separate USB Flash Drive.

Used the instructions above by scOttman...
To provide the choice at shut-down...
To save or not save the session.
Which is working well. :D

But what about DURING the session?
When changes to the session are COPIED back to the pupsave?

Is it possible to have the choice to allow or prevent this?
Yes. Go to start>desktop>Desktop drive icons manager. When you open that, look for a button on the bottom that says "show full manager" or something like that. When you click that, you will see a tab at top that says "saves" or something roughly like that. You will see, after you select that tab, a box with "30" in it. Change that to "0" if you want no saves at all.

You will need to reboot after you change the number so the change can be saved. If you save it from the desktop and stay in session it will keep saving every 30 minutes until you reboot.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#13 Post by Sylvander »

@walter90
Job done and functioning well. :D

Used "System->Puppy event manager" in the manner you described.

adXok
Posts: 68
Joined: Fri 12 Mar 2010, 12:08

#14 Post by adXok »

But can I make Puppy shutdown ask me everytime if I want to save the sassion to a particular location like the first time it did and I accidentaly save it to the USB?

I just want to save the sessions to (sdbX). How to do that?

Code: Select all

#save session...
case $PUPMODE in
 3) #PDEV1.
   echo "Saving session to $PDEV1..." >/dev/console
   /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
  ;;
 32) #first shutdown, save back to PDEV1. v3.97: xPDEV
  DEV1MNT="`mount | grep "/dev/$xPDEV" | tr -s " " | cut -f 3 -d " "`"
  if [ "$DEV1MNT" = "" ];then
   mkdir -p /mnt/$xPDEV
   mount -t $xDEVFS /dev/$xPDEV /mnt/$xPDEV
   if [ ! $? -eq 0 ];then
    echo "ERROR: unable to mount /dev/$xPDEV, cannot save." >/dev/console
    exit
   fi

User avatar
walter90
Posts: 282
Joined: Wed 26 Aug 2009, 03:53
Location: Pennsylvania, USA

#15 Post by walter90 »

Sylvander wrote:@walter90
Job done and functioning well. :D

Used "System->Puppy event manager" in the manner you described.
You're welcome! :D

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#16 Post by tlchost »

Thanks...worked fine.

Could rc.shutdown be changed to allow not only selective save, but also change the name of the save file?

Thom

User avatar
linuxsansdisquedur
Posts: 248
Joined: Tue 13 Jan 2009, 21:17
Location: South of France

#17 Post by linuxsansdisquedur »

8) A simple way to don't save file at shutdown or re-use other savepup without running in ram :
you delete savepup and copy an already saved one in home and shutdown when the copy is just done.
Next boot you will find this savepup instead of the last session one 8)
(i use pizzapup in frugaal -puppy2.14 puplet- :wink: )
le max avec le min

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#18 Post by nooby »

linuxsansdisquedur wrote:8) A simple way to don't save file at shutdown or re-use other savepup without running in ram :

you delete savepup and copy an already saved one in home and shutdown when the copy is just done.

Next boot you will find this savepup instead of the last session one 8)
(i use pizzapup in frugaal -puppy2.14 puplet- :wink: )
Could you tell more exactly how one do this?

Would not that only work if you do this within the 30 minutes before it has saved automatically or if you have set it to not save ever?

And Can one really delete a savefile that is booted? Don't you have to unmount the savefile in some way?

You suggest that one copy the savefile one want from a secured place over to the subdir of the deleted one.

But that one get run over by the shutdown version. So that is not working as I get it.

Sure I know almost nothing but something in your way of describing it fail to make me sure it works. Could it be that the older 2.14 version allowed it while the more recent puppy 431 would not?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
linuxsansdisquedur
Posts: 248
Joined: Tue 13 Jan 2009, 21:17
Location: South of France

#19 Post by linuxsansdisquedur »

sorry for late answer (in holidays 8) )
dunno if it work with puppy4 :? (gotta try in my 2 testing pupplet... and i tell u :wink: ) but yes i just copy my pupsave and when i want it back i copy it on the pupsave and reboot just when that done ! and it work !
(it make the same thing when you boot with other puppy or live cd and change the pupsave with your backup!)
le max avec le min

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#20 Post by nooby »

linuxsansdisquedur wrote:sorry for late answer (in holidays 8) )
dunno if it work with puppy4 :? (gotta try in my 2 testing pupplet... and i tell u :wink: ) but yes i just copy my pupsave and when i want it back i copy it on the pupsave and reboot just when that done ! and it work !
(it make the same thing when you boot with other puppy or live cd and change the pupsave with your backup!)
I am still wondering about this one. I know too little to decide on it.

I did a few test but how does one protect from this happening at same time it automatically does a pupsave?

If one look at Htop then it shows if a pupsave is being done or???
I use Google Search on Puppy Forum
not an ideal solution though

Post Reply