GUI shutdown

Most readers would know that shinobar developed 'pupsaveconfig', which provides GTK dialog windows to create a save-file (to save session at first shutdown), rather than the text-mode dialog windows that have always been offered in Puppy.

Here is the Forum thread on pupsaveconfig 1.9.9:
http://www.murga-linux.com/puppy/viewtopic.php?t=60678

Excellent work, but I never put that into Woof, as I wanted to do it a bit differently. Over the last few days I have implemented it the way I want.

For the sake of efficiency, I wanted all of the code in /etc/rc.d/rc.shutdown that presents the dialog windows to work with or without X -- without then use 'dialog', with then use ...well, Xdialog would be the usual choice.

I took all of the code concerned with saving the session out of rc.shutdown, and created /usr/sbin/shutdownconfig. This is called from rc.shutdown when shutting down without X running. However, when shutting down from the desktop, the two scripts that handle exiting from X, /usr/bin/wmpoweroff and /usr/bin/wmreboot, now call shutdownconfig. So, the same code is called, with or without X running.

I wrote 'pupdialog', which has simple compatibility to 'dialog', but runs in X with GTK dialog windows. Currently it supports the --msgbox, --yesno, --menu and --inputbox dialogs. It uses gtkdialog3 or gtkdialog4.

What happens now, is at the first boot (or "pfix=ram", that is, PUPMODE=5), when power-off or reboot is chosen from the Shutdown menu, dialog windows now appear on the desktop, before X exits. So, you get a nicer interface and can use the mouse for selecting.

If you still want the old non-X shutdown dialogs, just exit from X to the prompt and type in "poweroff" or "reboot".

This will be in the next upload of Woof. It is not yet internationalized, I want to be sure that it works properly first.


Posted on 21 Sep 2011, 16:12


Comments:

Posted on 21 Sep 2011, 16:31 by L18L
shutdown 118n
This will be in the next upload of Woof. It is not yet internationalized, I want to be sure that it works properly first.
A wise decision.
Thank you, Barry.
BTW, why not take yad for X ?


Posted on 21 Sep 2011, 17:02 by BarryK
Re yad
I needed drop-in replacement for 'dialog'. Also, I wanted to tweak the appearance in various ways not possible with Xdialog.



Posted on 21 Sep 2011, 20:30 by nancy reagan
Pupsave not now
Being a very low profile wannabee user, wonder whether you could provide this as a pet as well ? as I am not using the -latest-,


Posted on 21 Sep 2011, 20:43 by 01micko
re "Pupsave not now"
FWIW.. I think that many more things in woof should be flexible, that is, easier to add or remove, Woof is very Wary/Quirky/Racy centric and this does make things more difficult for you (Barry) and me. For you, because you have to maintain that little sub-strata.

Also, users like Nancy miss out on outstanding new developments, some of which can be back ported as PETS.



Posted on 21 Sep 2011, 23:39 by jim1911
4fs save file
Please reconsider including an option to create a 4fs save file on shutdown. TazOC has that as the default option on LHP and it is very stable and appears to be faster than both 2fs and 3fs save files.


Posted on 22 Sep 2011, 10:18 by BarryK
PET for new shutdown
Ok, I'll create a PET for it, so the new shutdown GUIs can be retrofitted to existing puppies.
You would have to install it either when building in Woof, or at the first bootup, before shutting down. Or, of course, install it then remaster Puppy.



Posted on 22 Sep 2011, 17:11 by BarryK
shutdownconfig PET
Ok, I have created a PET for the GUI shutdown, so it can be retrofitted to existing puppies. Those building puppies with Woof can also use the PET without having to wait to upgrade Woof.

http://distro.ibiblio.org/quirky/test/zz_shutdownconfig-1.pet

It is working great for me. Retrofitting though, will only work so-far back... the PET has a replacement /etc/rc.d/rc.shutdown that may make some assumptions that are inappropriate for older puppies. The new 'yaf-splash' is used (yaf-splash is actually a symlink to 'gtkdialog-splash'), which has been in Woof for the last several months I think -- the shutdown will crash if tries to use the original yaf-splash.

Anyone interested in internationalizing the script? The script is /usr/sbin/shutdownconfig. It needs someone with experience in doing this, 'gettext' conversions inserted at the appropriate places.
Note that 'shutdownconfig' can be run directly for testing, without having to do an actual shutdown.

A note about 'pupdialog', which is also in the PET. I have to pat myself on the back with this one, nicely coded and very easy to add support for more dialog box types in the future.

The PET also has 'pupkill', which is a wrapper for 'kill', adds proper killing of pupdialog dialog windows.



Posted on 22 Sep 2011, 17:34 by 01micko
re shutdownconfig
Thanks BK

I will be adding this to Slacko B4 (due at worst before Sunday, hopefully tomorrow)

Cheers

PS: does it include you new pupdialog? (or depend on)


Posted on 22 Sep 2011, 18:42 by BarryK
Shutdownconfig Forum thread
I started a Forum thread to give this wider exposure and testing:

http://murga-linux.com/puppy/viewtopic.php?t=71911

01micko,
Yes, 'pupdialog' is in the PET.



Posted on 22 Sep 2011, 19:13 by nancy reagan
Thankie
Thanks


Posted on 22 Sep 2011, 19:14 by 01micko
common repo?
Just a thought... putting zz_shutdownconfig-1.pet in the "common" repo may have made more sense.


Posted on 22 Sep 2011, 19:14 by L18L
i18n shutdown
Anyone interested in internationalizing the script?
I will do it


Posted on 23 Sep 2011, 4:11 by Ted Dog
No TXT
The use of full screen terminal (non-Xwin) is a real issue with EFI booting/shutdown on iPuppy (MacTel based puppy) effort. Glad to see this going forward.



Posted on 23 Sep 2011, 8:02 by BarryK
zz_shutdownconfig
01micko,
No, this PET is only temporary. I will remove it soon.

The scripts are part of Woof, and those who build new puppies are expected to use latest Woof. rc.shutdown in particular is a key script in Woof, having it in a separate PET as well is asking for trouble.

L18L,
Thanks, much appreciated!



Posted on 23 Sep 2011, 13:05 by technosaurus
busybox, xfprot
speaking of common repo...

when the directory names are changed/moved/deleted, it kinda breaks stuff... just glad I don't run from CD/DVD



Posted on 23 Sep 2011, 18:56 by 01micko
re gui shutdown
Only 1 tiny bug. At the stage where the 2fs/3fs is created, the splash screen fails to die a natural death, persists until shutdown. It's in Slacko B4 now released..


Posted on 24 Sep 2011, 18:18 by BarryK
GUI shutdown update
I have fixed a few things. The 'shutdownconfig' and 'pupdialog' scripts have changed. New PET:

http://distro.ibiblio.org/quirky/test/zz_shutdownconfig-20110924.pet

One thing was to get all the dialog windows to fit within a 480 pixel height screen.
Some small mods in shutdownconfig, introduction of scrollbars to --menu dlg in pupdialog if more than a certain number of items.

There was a bug where a "Please wait..." dialog did not get killed.

In the dialog window where a choice of partitions is offered, the recommended one is supposed to be pre-highlighted. Fixed.

I also changed the background colour to somewhat paler. The main windows have yellow background, now a pale yellow.



Posted on 24 Sep 2011, 19:36 by L18L
GUI shutdown i18n
i18n on old version
http://www.murga-linux.com/puppy/viewtopic.php?p=567171
Can you repeat the fix on this or shall I try to do it ?
Regards


Posted on 25 Sep 2011, 19:38 by L18L
GUI shutdown i18n
Forget it, please

I have applied your changes, an easy exercise using Xfdiff-cut.

Have a nice sunday evening


Posted on 26 Sep 2011, 15:43 by BarryK
pupsaveconfig is not shutdownconfig
Just to clarify something. I noticed a post on the Forum, someone is confused about the relationship between shinobar's pupsaveconfig and my shutdownconfig.

I did not use any of shinobar's code. My effort was done from scratch. So, there is no relationship between the two other than that they solve similar problems.

My shutdownconfig currently only does one thing, supply X GUI dialogs when shutting down for the first time (PUPMODE=5). Shinobar's package does that, plus has some extra features, such as being able to modify or clone an existing save-file, or create a new one.

I might add such extra features later.



Posted on 3 Oct 2011, 7:47 by 8-bit
re shutdownconfig
A little while back shutdown was modified so that one had a clean shutdown.
Was this feature retained in the GUI version?