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 Thu 02 Oct 2014, 08:39
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to remove Save icon on desktop, save at shutdown?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: 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
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

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

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

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

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Mon 09 Apr 2012, 14:35    Post_subject:  

Dude, you are the MAN!


-------------------------------------
Way of the Samurai
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2560
Location: New Zealand

PostPosted: 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
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: 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).

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2560
Location: New Zealand

PostPosted: 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
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3447
Location: West Lothian, Scotland, UK

PostPosted: 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
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2560
Location: New Zealand

PostPosted: 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!
.

Edited_times_total
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2560
Location: New Zealand

PostPosted: 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
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3447
Location: West Lothian, Scotland, UK

PostPosted: 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
View user's profile Send_private_message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 10 Aug 2012, 07:13    Post_subject:  

dialog --defaultno --yesno . . .
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2560
Location: New Zealand

PostPosted: Sat 11 Aug 2012, 06:02    Post_subject:  

Thanks nPierce - that worked nicely. Perfect.
Back to top
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3447
Location: West Lothian, Scotland, UK

PostPosted: Sat 11 Aug 2012, 06:15    Post_subject:  

greengeek wrote:
Thanks nPierce - that worked nicely. Perfect.

Same here. Very Happy Cool
Back to top
View user's profile Send_private_message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Sat 11 Aug 2012, 06:49    Post_subject:  

You're both welcome. Glad to hear it's working for you.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
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.0804s ][ Queries: 12 (0.0044s) ][ GZIP on ]