How to remove Save icon on desktop, save at shutdown?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

How to remove Save icon on desktop, save at shutdown?

#1 Post by Ghost Dog »

Hey I'm making a totally awesome new derivative, but I had questions. One is how do I change things after it loads from a save file so that it doesn't say "Load RAM into pup save" and show that little "save" icon. I just want it to save at logout, and that little icon is cramping my style. Second, what is the name of the icon (picture of dog's head and a text file) for the save file?

Thanks in advance



-----------------------------------
Way of the Samurai

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Re: Save icon on desktop etc.

#2 Post by RSH »

Ghost Dog wrote:Hey I'm making a totally awesome new derivative, but I had questions. One is how do I change things after it loads from a save file so that it doesn't say "Load RAM into pup save" and show that little "save" icon. I just want it to save at logout, and that little icon is cramping my style. Second, what is the name of the icon (picture of dog's head and a text file) for the save file?

Thanks in advance
http://murga-linux.com/puppy/viewtopic. ... 588#602708
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#3 Post by RSH »

Look also at my previous post.

File /etc/rc.d/rc.shutdown

Code: Select all

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

i do have put this into /etc/rc.d/rc.shutdown at line 877.

Do search for this string /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw (or a part of it) in your puppy's /etc/rc.d/rc.shutdown.

Using this, you can choose on shutdown, if you want to save or not.

To let the puppy not save the session while you are using the puppy, do use the eventmanager and set save interval to 0.

Hope this helps.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

#4 Post by Ghost Dog »

Dude, you are the MAN!


-------------------------------------
Way of the Samurai

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#5 Post by greengeek »

I would like to do the opposite - I want to keep the save icon (so I can save if I want to), but I do not want the system to save automatically during use. When I shutdown I want the system to ask me if I want to save or not.

Which is the "eventmanager" you are referring to? Is that in the menu on some puppies?

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#6 Post by RSH »

Yes, it is in Menu System - System Schedule or in LazY Puppy: Menu Workstation - System Schedule.

I think you can also edit /etc/eventmanager, but do not know, if restart of X is needed then.

EDIT:

LazY Puppy has a menu entry in Menu Utility to let you save the session manually. I put this in because i have removed the icon.

EDIT2:
Ghost Dog wrote:Dude, you are the MAN!
Aahhh...

...thank you - but it was not me (the second part, really). I did learn this from stu90 or scOttman (can't remember correctly).
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#7 Post by greengeek »

Thanks RSH. Yes, it seems to be there in Menu, System, Puppy event manager. I have not used that before. Makes it easy. Thanks!

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

#8 Post by Sylvander »

greengeek wrote:I want to keep the save icon (so I can save if I want to), but I do not want the system to save automatically during use. When I shutdown I want the system to ask me if I want to save or not.
See THIS.
And...
How to prevent the spurious warning as a pupsave installation of Puppy boots, that the previous shut-down was improper.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#9 Post by greengeek »

Thank you Sylvander, your method of forcing the shutdown procedure to ASK if I want to save or not worked very well and now it is behaving exactly how I want it.

I did have a bit of a problem when I tried to search for the line that mentions /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw

I could see three instances of that exact line, so it took me a while to realise what Scottman was saying about which one to modify. (and the one I needed to modify was nowhere near line 825...)

Anyway, I thought I would post exactly what I did (so I can find it again next time...)

Here is what I did:

Navigate to /etc and make a backup copy of the /etc/rc.d/rc.shutdown file.

Use Leafpad or Geany to open file /etc/rc.d/rc.shutdown

Search for this code:

Code: Select all

/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
(you may have multiple instances of it). Look for the one that is preceeded by the following code:

Code: Select all

#the above are in unionfs at /
Everything between that line, and the double ;; a few lines down, needs to be removed and replaced with a different dialog.

After removing the original stuff, replace it with this code:

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 see:

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
;;
(NOTE): if you want the dialog to default to NO instead of YES you can modify the dialog line to:
dialog --defaultno --yesno "Save this session?" 0 0 >/dev/console


Save the file.

Click on the "SAVE" icon on the desktop so that the changes are made permanent.
Shutdown, say yes to "SAVE".
Reboot and test. (if any problem, just restore the backup version of the file you modified).

Oh, I forgot to mention that I am doing this on a USB install of Slacko Lite
.
Thanks for the help!
.
Last edited by greengeek on Sat 11 Aug 2012, 10:00, edited 2 times in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#10 Post by greengeek »

.
..just one question...

in the code above, it asks for the dialog to display a --yesno dialog, and the effect of this is that the "yes" appears first, and is the highlighted (default) choice.

I would like the "No" option to be the default choice. Do you think I could modify / reverse the code to use the expression --noyes ? Or would that just be meaningless?

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

#11 Post by Sylvander »

greengeek wrote:I would like the "No" option to be the default choice. Do you think I could modify / reverse the code to use the expression --noyes ? Or would that just be meaningless?
I'm afraid that's beyond my ken.
Vaguely remember that if you do nothing, at the expiry of the timeout (30-second default that can be changed?), it doesn't save.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#12 Post by npierce »

dialog --defaultno --yesno . . .

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#13 Post by greengeek »

Thanks nPierce - that worked nicely. Perfect.

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

#14 Post by Sylvander »

greengeek wrote:Thanks nPierce - that worked nicely. Perfect.
Same here. :D 8)

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#15 Post by npierce »

You're both welcome. Glad to hear it's working for you.

Post Reply