Desktop-Restore

Window managers, icon programs, widgets, etc.
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Desktop-Restore

#1 Post by jpeps »

Backs up desktop automatically on shutdown if any changes were made.
After reboot, Menu/Setup/Desktop-Restore restores previous desktop.
Useful after SFS installs, when icons get rearranged.

from terminal: desktop-restore [ -r -b ] restore/backup

not needed from version 2.2: [Note: If you want to use your own rc.shutdown script, just add:
"desktop-restore -b" near the top, after the comments. ]

Version 2.0: deleted the edited copy of rc.shutdown. Instead, during install it opens the current copy with a prompt to edit. Type "desktop-restore -b" near the top after all the initial comments (comments start with "#")
Version 2.1 Spruced up pinstall so it continues or quits with command keys.
Version 2.2 Added backup script to /etc/init.d, so command in rc.shutdown isn't needed (Thanks Rwin & pemasu)
Attachments
desktop-restore-2.2.pet
(2.1 KiB) Downloaded 1633 times
Last edited by jpeps on Sun 16 Sep 2012, 19:34, edited 5 times in total.

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

#2 Post by sc0ttman »

Great idea. Gonna test now.
[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]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#3 Post by jpeps »

Version 2.0: Added a pinstall script that opens rc.shutdown for editing during the initial install...vs clobbering with another version. Also, put it in /Menu/Desktop instead of Setup.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#4 Post by jpeps »

Version 2.1 Made pinstall more user friendly

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

Many thanks jpeps. Very handy solution to an enduring problem.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

To enable restore desktop at startup

#6 Post by tlchost »

What do I need to do to have desktop restore run auomaticially at boot up?

Thanks

Thom

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Re: To enable restore desktop at startup

#7 Post by jpeps »

tlchost wrote:What do I need to do to have desktop restore run auomaticially at boot up?

Thanks

Thom
Make sure you've added the line "desktop-restore -b" to rc.shutdown.

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

Re: To enable restore desktop at startup

#8 Post by oldyeller »

jpeps wrote:
tlchost wrote:What do I need to do to have desktop restore run auomaticially at boot up?

Thanks

Thom
Make sure you've added the line "desktop-restore -b" to rc.shutdown.
I am just curious is -b stand for backup?

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

Re: To enable restore desktop at startup

#9 Post by tlchost »

jpeps wrote: Make sure you've added the line "desktop-restore -b" to rc.shutdown.
Now I am confused...that is already in rc.shutdown....I want to
have desktop-restore -r (which I believe is the command to restore
the desktop that was backed up) when the system boots up.

Here, after adding an sfs file...the desktop needs to be manually restored via the menu after a reboot. I'd like it to be automatic.

thanks

Thom

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#10 Post by jpeps »

I think /etc/profile.local runs apps after the desktop loads. "desktop-restore -r" restores the backup (desktop-restore -b runs the backup).

note: a script in /root/Startup should also work.

Code: Select all

#!/bin/sh
desktop-restore -r

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

#11 Post by tlchost »

jpeps wrote:I think /etc/profile.local runs apps after the desktop loads. "desktop-restore -r" restores the backup (desktop-restore -b runs the backup).

Yep....placed the script that you mentioned and it works fine. Thanks!

Code: Select all

#!/bin/sh
desktop-restore -r
note: a script in /root/Startup should also work.
Ah the beauty of having a backup of the save file! I tried that, and it worked....and worked, and worked, and worked .... every time x restarted it ran the script.

Thom

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#12 Post by pemasu »

Rerwins suggestion which I have used now in dpup.
The code has been placed in /etc/init.d/desktop-backup:

Code: Select all

#!/bin/sh
#Save desktop icon configuration for desktop-restore function.
case $1 in
 stop)
  mkdir /root/.desktop 2>/dev/null
  cp -p /root/Choices/ROX-Filer/PuppyPin  /root/.desktop 2>/dev/null
  cp -p /root/.config/rox.sourceforge.net/ROX-Filer/globicons /root/.desktop 2>/dev/null
 ;;
esac
Cheers.

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

#13 Post by tlchost »

pemasu wrote:Rerwins suggestion which I have used now in dpup.
The code has been placed in /etc/init.d/desktop-backup:
Thanks.
Thom

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#14 Post by jpeps »

pemasu wrote:Rerwins suggestion which I have used now in dpup.
The code has been placed in /etc/init.d/desktop-backup:
pemasu, desktop-restore won't backup in exprimo with your code. It needs a space after "-b" in the rc.shutdown file

Code: Select all

desktop-restore -b# jpeps desktop backup and restore needs this

User avatar
kooliepup
Posts: 292
Joined: Sat 14 Jan 2012, 03:40
Location: Victoria, Australia

#15 Post by kooliepup »

This is such a good thing for us crazy people who have multiple frugal installs, and keep changing everything.

It is a must for the toolkit, and should be in every Puppy.

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

#16 Post by tlchost »

kooliepup wrote: It is a must for the toolkit, and should be in every Puppy.
Could not agree more...that and ability NOT to save at shutdown

Thom

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

#17 Post by tlchost »

jpeps wrote:I think /etc/profile.local runs apps after the desktop loads. "desktop-restore -r" restores the backup (desktop-restore -b runs the backup).

Code: Select all

#!/bin/sh
desktop-restore -r
In slacko 5.3.3 the script goes in /etc/profile.d

Thom

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#18 Post by jpeps »

Posted update with auto backup in /etc/init.d. Command in rc.shutdown still works, but isn't needed. Thanks Rewin & pemasu!

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#19 Post by 666philb »

hi jpeps ... instead of restarting x when restoring the pinboard you can just reload the pinboard

Code: Select all

rox -p /root/Choices/ROX-Filer/PuppyPin
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#20 Post by jpeps »

666philb wrote:hi jpeps ... instead of restarting x when restoring the pinboard you can just reload the pinboard

Code: Select all

rox -p /root/Choices/ROX-Filer/PuppyPin
That doesn't seem to restore the icons

Post Reply