| Author |
Message |
Ghost Dog

Joined: 27 Jan 2012 Posts: 43
|
Posted: Mon 09 Apr 2012, 00:23 Post subject:
How to remove Save icon on desktop, save at shutdown? |
|
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
|
|
Back to top
|
|
 |
RSH

Joined: 05 Sep 2011 Posts: 1564 Location: Germany
|
Posted: Mon 09 Apr 2012, 01:29 Post subject:
Re: Save icon on desktop etc. |
|
| 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.php?p=602708&search_id=1723673588#602708
_________________ Useful Software for Puppy!
LazY Puppy - a Paradise Puppy! - DE & EN ISO 2.0.2-0.0.5 available
|
|
Back to top
|
|
 |
RSH

Joined: 05 Sep 2011 Posts: 1564 Location: Germany
|
Posted: Mon 09 Apr 2012, 01:36 Post subject:
|
|
Look also at my previous post.
File /etc/rc.d/rc.shutdown
| Code: |
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.
_________________ Useful Software for Puppy!
LazY Puppy - a Paradise Puppy! - DE & EN ISO 2.0.2-0.0.5 available
|
|
Back to top
|
|
 |
Ghost Dog

Joined: 27 Jan 2012 Posts: 43
|
Posted: Mon 09 Apr 2012, 14:35 Post subject:
|
|
Dude, you are the MAN!
-------------------------------------
Way of the Samurai
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Tue 07 Aug 2012, 22:01 Post subject:
|
|
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?
|
|
Back to top
|
|
 |
RSH

Joined: 05 Sep 2011 Posts: 1564 Location: Germany
|
Posted: Tue 07 Aug 2012, 22:11 Post subject:
|
|
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).
_________________ Useful Software for Puppy!
LazY Puppy - a Paradise Puppy! - DE & EN ISO 2.0.2-0.0.5 available
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Wed 08 Aug 2012, 01:05 Post subject:
|
|
Thanks RSH. Yes, it seems to be there in Menu, System, Puppy event manager. I have not used that before. Makes it easy. Thanks!
|
|
Back to top
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2853 Location: West Lothian, Scotland, UK
|
Posted: Wed 08 Aug 2012, 02:12 Post subject:
|
|
| 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.
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Thu 09 Aug 2012, 21:03 Post subject:
|
|
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: | | /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: | | #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: | 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: | #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, 06:00; edited 2 times in total
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Thu 09 Aug 2012, 21:08 Post subject:
|
|
.
..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?
|
|
Back to top
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2853 Location: West Lothian, Scotland, UK
|
Posted: Fri 10 Aug 2012, 01:56 Post subject:
|
|
| 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.
|
|
Back to top
|
|
 |
npierce
Joined: 28 Dec 2009 Posts: 637
|
Posted: Fri 10 Aug 2012, 07:13 Post subject:
|
|
dialog --defaultno --yesno . . .
|
|
Back to top
|
|
 |
greengeek
Joined: 20 Jul 2010 Posts: 1184 Location: New Zealand
|
Posted: Sat 11 Aug 2012, 06:02 Post subject:
|
|
Thanks nPierce - that worked nicely. Perfect.
|
|
Back to top
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2853 Location: West Lothian, Scotland, UK
|
Posted: Sat 11 Aug 2012, 06:15 Post subject:
|
|
| greengeek wrote: | | Thanks nPierce - that worked nicely. Perfect. |
Same here.
|
|
Back to top
|
|
 |
npierce
Joined: 28 Dec 2009 Posts: 637
|
Posted: Sat 11 Aug 2012, 06:49 Post subject:
|
|
You're both welcome. Glad to hear it's working for you.
|
|
Back to top
|
|
 |
|