PupShutdown-3.0

Miscellaneous tools
Message
Author
radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

PupShutdown-3.0

#1 Post by radky »

Recommended OS
Puppy Linux with gtkdialog4 (0.7.21 or greater)

Purpose and Base Features
PupShutdown permits menu-like access to sixteen common functions that one may find helpful when closing a Puppy session. Backup and task manager selections in the main menu have multi-program support to provide flexibility in managing the shutdown process. If the panel application selector does not have your program, you can add it manually. In addition to the configurable menu options, the appearance of the graphic interface can be quickly changed to complement a personal preference or match a Puppy theme. PupShutdown integrates seamlessly with PupControl, PupMenu and PupApps.

Caveats
1 - PupShutdown requires Puppy versions 4.3.1 and above to assure accurate markup of title text attributes and to allow automatic retrieval of the font name list.

2 - Program access is by Puppy Menu->Utility->PupShutdown or by the default Ctrl+Shift+X keyboard shortcut which is configured for IceWm, JWM, Openbox, Fluxbox, LXDE and LXPanel. If the Xfce window manager is currently active, the hotkey can be set manually as follows: Xfce Settings->Keyboard->Application Shortcuts.

3 - For those with laptops or notebooks, PupShutdown supports suspend (standby) in ACPI compliant systems.

Title and Logo Options
The title frame of PupShutdown is easily configured and one can quickly change the name and version of the Puppy derivative, graphic logo, and title font attributes. An optional Logo-addon.pet contains 64-pixel graphics created by forum member afgs, including those for Dpup, Lighthouse, Slacko and Upup. For those who prefer a more distinctive theme, a logo template is available to facilitate the design of copy-and-paste graphics for the title frame.

Download
http://www.smokey01.com/radky/PupShutdown-3.0.pet (gettext by vicmz)

Optional Graphics:
http://www.smokey01.com/radky/Logo-addon-1.1.pet

Image

PupMates
http://www.smokey01.com/radky/PupMates.html
Last edited by radky on Sat 23 Sep 2017, 02:55, edited 35 times in total.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#2 Post by zigbert »

Offering code in your first post is a great start. Welcome!!!

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

#3 Post by radky »

Version 1.1. See main post.
Removed redundant code to improve performance.

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

#4 Post by radky »

Version 1.2. See main post.
Added preview of fonts, and changed button selections in Preferences dialog.
Minor improvement in code.

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

excellent

#5 Post by raffy »

Excellent work!

I wonder whether this approach can also be made for the boot up routine, especially at that point when Puppy searches for its program sfs, the source of most boot-up failures (Here, pmedia, pdev, pupmode as well as psubdir are the less-understood parameters).
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

#6 Post by radky »

Thanks raffy

I'm not sure if this approach has any additional utility, especially in the boot-up routine of Puppy, but in PupShutdown it does provide a little diversionary eye candy. Thanks again for your thoughts!

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

PupShutdown feedback

#7 Post by B.K. Johnson »

That's nice. A couple options I'd like to see in your next update are "PowerOff and Eject" and "Reboot and Eject". Ubuntu has been doing this for a long time and dpup-484 does it too.

Why? Puppy lore encourages booting continually from the LiveCD and to save personal file to enable using the boot CD drive for other purposes after booting. However, if I don't use the drive during a session I find myself forgetting to remove the CD before shut down and have to resort to the paperclip trick.

B.K. Johnson

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

Re: PupShutdown feedback

#8 Post by radky »

B.K. Johnson wrote:That's nice. A couple options I'd like to see in your next update are "PowerOff and Eject" and "Reboot and Eject". Ubuntu has been doing this for a long time and dpup-484 does it too.
Thanks for your comments B.K.

The automatic ejection of optical disc media at shutdown seems more appropriate for those Puppy developers who would code this feature as a default behavior in /etc/rc.d/rc.shutdown, such as gposil with dpup. Even so, I could provide PupShutdown with simple dialogs that would prompt users (at their discretion) to remove optical media before power-off or rebooting. Such dialogs could be quickly bypassed if media removal is not a consideration. The end result would be the same for you - no more CD neglect at shutdown. I'll see what I can do.

Regards,
radky

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

PupShutdown-1.3

#9 Post by radky »

Version 1.3. See main post.
-Added option for multi-function management of the desktop and JWM, including 14 secondary options.
-Added Snap2 (if installed) as the first option for file backup, otherwise the call defaults to Pbackup.
-Added Power-Off and Reboot dialog prompts for the discretionary removal of optical disc media before shutdown.
-Minor improvement in code.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

Feedback on PupShutdown-1.3

#10 Post by B.K. Johnson »

radky
That's nice. A couple options I'd like to see in your next update are "POwerOff and Eject" and "Reboot and Eject". Ubuntu has been doing this for a long time and dpup-484 does it too.

Why? Puppy lore encourages booting continually from the LiveCD and to save personal file to enable using the boot CD drive for other purposes after booting. However, if I don't use the drive during a session I find myself forgetting to remove the CD before shut down and have to resort to the paperclip trick.

B.K. Johnson

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

Re: Feedback on PupShutdown-1.3

#11 Post by radky »

B.K. Johnson wrote:radky
That's nice. A couple options I'd like to see in your next update are "POwerOff and Eject" and "Reboot and Eject". Ubuntu has been doing this for a long time and dpup-484 does it too.

Why? Puppy lore encourages booting continually from the LiveCD and to save personal file to enable using the boot CD drive for other purposes after booting. However, if I don't use the drive during a session I find myself forgetting to remove the CD before shut down and have to resort to the paperclip trick.

B.K. Johnson
B.K.

Thanks again for your comments. As mentioned in post 7 above, the automatic ejection of media could be addressed by developers who code Puppy's basic framework. Guy Posil did so with the much-respected dpup 484 which features automatic CD ejection at shutdown, and includes a program to control the optical disc tray from the taskbar. On the other hand, PupShutdown is just a simple menu utility that opens various Puppy programs on demand.

In response to your request, version 1.3 above includes alert dialogs at reboot or shutdown to remind us of the option to remove optical disc media if so desired. Also, the upcoming version 1.4 will feature a configurable control panel that allows easy access to most Puppy system functions.

Regards,
radky

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

Option "DO NOT SAVE" at shutdown ?

#12 Post by nancy reagan »

Hi Radky,

As you keep rebuilding this pet I take the liberty to ask for the feature the choose the option

"DO NOT SAVE" - at shutdown.

For I only want to save once in a bluemoon. Mainly for the initial settings. It seems I am not the only one.

In the post of the link below, Sc0ttman describes how to write in terminal. Would it be hard to incorporate this in your wonderful pet ?

http://www.murga-linux.com/puppy/viewto ... d5c8a979d8



Looking forwad to your reply, whether or not, it is possible ?.

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

Re: Option "DO NOT SAVE" at shutdown ?

#13 Post by radky »

As you keep rebuilding this pet I take the liberty to ask for the... option "DO NOT SAVE" - at shutdown.
Nancy, I think your request could be very useful for those who boot Puppy in flash memory.

I’ll see what I can do for the next release. Thanks for the inquiry.

Regards,
radky

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

Keep pm-ing you about results

#14 Post by nancy reagan »

Hi Radky don't know what goes wrong but I replied 4 or 5 times but my sentbox does not show anything.

Could you pm me your mailaddress or let me know that you received nevertheless my pm's ?

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

#15 Post by radky »

Hi Radky don't know what goes wrong but I replied 4 or 5 times but my sentbox does not show anything.
Nancy, Thanks for your PM. Please check your inbox for an update. PupShutdown 1.4 will be available soon, plus the following new programs: JWM Clockset, PupApps, PupControl and PupSnap.

Thanks,
radky

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#16 Post by Jim1911 »

radky wrote:PupShutdown 1.4 will be available soon, plus the following new programs: JWM Clockset, PupApps, PupControl and PupSnap.
Good news, PupShutdown 1.3 works great on all pups that I've tried.

Thanks,
Jim

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#17 Post by 8-bit »

How would one replace Shutdown in the Lucid 511 menu with PupShutdown?
Also, what backup program is run by the backup button?

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

#18 Post by radky »

8-bit, thanks for your questions.
How would one replace Shutdown in the Lucid 511 menu with PupShutdown?
This would depend on the window manager, but for JWM in Lucid 511 you could try the following:

Go to /etc/xdg/templates/_root_.jwmrc

To add the PupShutdown entry immediately below the Help entry:
Insert the following below line #28 (without the outside quotes):
“ <Program label="PupShutdown" icon="shutdown24.png">exec PupShutdown</Program>
Last edited by radky on Mon 18 Apr 2011, 19:02, edited 1 time in total.

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#19 Post by Jim1911 »

[quote="radky"]This would depend on the window manager, but for JWM in Lucid 511 you could try the following:

Go to /etc/xdg/templates/_root_.jwmrc

To add the PupShutdown entry immediately below the Help entry:
Insert the following below line #28 (without the outside quotes):
“ <Program label="PupShutdown" icon="shutdown24.png">exec PupShutdown</Program>

radky
Posts: 977
Joined: Mon 03 May 2010, 03:13

#20 Post by radky »

Do you have the corresponding code for Openbox?
Hi Jim,

Thanks for the question. If I understand correctly, you’re referring to the combination of Openbox and Fbpanel in the upcoming Lucid Puppy 5.2.

For the Fbpanel menu, you could try the following:

Go to /usr/sbin/pfbpanel

To add the PupShutdown entry immediately below the Help entry:
Insert the following on line #774:

echo "item {
name = PupShutdown
action = PupShutdown
image = /usr/local/PupShutdown/icons/shutdown20.png
}" >> $DEFAULT


Then run usr/bin/fbpanel_menu_refresh

---

The PupShutdown entry and surrounding script will look something like this:

echo "menu {
name = Help
image = ${X11PIXMAPS}/help24.png
item {
name = Help
action = defaulthtmlviewer file:///usr/share/doc/index.html
image = ${X11PIXMAPS}/help24.png
}
}" >> $DEFAULT

echo "item {
name = PupShutdown
action = PupShutdown
image = /usr/local/PupShutdown/icons/shutdown20.png
}" >> $DEFAULT


echo "menu {
name = Shutdown
image = ${X11PIXMAPS}/shutdown24.png
item {
name = Exit to prompt
action = wmexit
image = ${X11MINIICONS}/prompt16.xpm
}
item {
name = Reboot computer
action = wmreboot
image = ${X11MINIICONS}/mini-turn.xpm
}
item {
name = Power-off computer
action = wmpoweroff
image = ${X11MINIICONS}/mini-stop.xpm
}
item {
name = Restart X server
action = restartwm
image = ${X11MINIICONS}/mini-x.xpm
}
}" >> $DEFAULT

---

Regards,
radky

Post Reply