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 31 Jul 2014, 01:27
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Shutdownconfig: GUI shutdown
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [33 Posts]   Goto page: 1, 2, 3 Next
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 22 Sep 2011, 06:37    Post subject:  Shutdownconfig: GUI shutdown
Subject description: Nice GUI shutdown dialogs in X
 

My blog post explains everything;

http://bkhome.org/blog/?viewDetailed=02489

I have posted a PET for retrofitting to existing puppies, if anyone wants to play with it.

Though, as I have mentioned, it is intended to be used with fairly recent Woof-built puppies (Racy, Wary, Slacko, pemasu's Dpup). Lucid Puppy is built with an older Woof and I don't know if there would be any problems using the PET with it.

One thing I mentioned, the new 'yaf-splash' (gtkdialog-splash) is required. There are some variants of this around. The one in Woof is attached -- it was put into Woof almost a year ago I think -- but if you don't have it, or have a different variant, grab this, gunzip it, make sure it has execute flags set, place at /usr/bin, make yaf-splash a symlink to it:

Code:
# ln -s gtkdialog-splash /usr/bin/yaf-splash


Is anyone interested in internationalizing /usr/sbin/shutdownconfig?
gtkdialog-splash.gz
Description 
gz

 Download 
Filename  gtkdialog-splash.gz 
Filesize  2.69 KB 
Downloaded  442 Time(s) 

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Jim1911

Joined: 19 May 2008
Posts: 2445
Location: Texas, USA

PostPosted: Thu 22 Sep 2011, 13:04    Post subject:  

Working fine on Three Headed Dog. Great that it has more size selections. However, please consider adding an option to select 4fs save files as shinobar has done with his shutdown application.
Back to top
View user's profile Send private message 
nancy reagan

Joined: 22 Jan 2009
Posts: 504

PostPosted: Thu 22 Sep 2011, 16:12    Post subject: Saved without asking on 2nd shuwtdown  

Tried it in Exprimo, however on 2nd shutdown, when I did not want to save the garbage I got no choice to, or, not to, save.

Is this the way it is meant to be or did I something wrong ?
Back to top
View user's profile Send private message 
pemasu


Joined: 08 Jul 2009
Posts: 5463
Location: Finland

PostPosted: Thu 22 Sep 2011, 16:29    Post subject:  

nancy reagan. For dpup exprimo. You need to include the row killall enlightenment pretty much anywhere to the /usr/bin/wmpoweroff and wmreboot scripts.
Thats not Barrys fault. E17 needs that enlightenment has been killed.

I could do that at woof level. Those scripts are prefixed in every release. For pet, you can do it yourself. Easy fix.

About resaving. You need to boot pfix=ram.
PUPMODE=5 is needed for that pet to work. It checks if you have booted at pristine mode without previous save file.
This pet does not create opportunity to create repeated savefiles or not save another session. And I believe installing pets with PPM will be written straight to the savefile anyway. I might be wrong in some aspects. I correct my post according to faults if/when someone corrects me.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10948
Location: Arizona USA

PostPosted: Thu 22 Sep 2011, 23:22    Post subject:  

Before I try it, will it work with a Racy multisession DVD?
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 23 Sep 2011, 20:55    Post subject: Re: Saved without asking on 2nd shuwtdown  

nancy reagan wrote:
Tried it in Exprimo, however on 2nd shutdown, when I did not want to save the garbage I got no choice to, or, not to, save.

Is this the way it is meant to be or did I something wrong ?


Shutdownconfig is only for the first shutdown, when you have booted without any save-file.

Regarding your question about a choice whether to save on subsequent boots, normally no choice is possible. It depends on how you are running Puppy. If running from live-CD (with save-file on hard drive) or frugal installation (on hard drive), the work of your current session is immediately saved on the save-file. Thus, there is no choice possible for not saving it.

However, if you have installed Puppy to a USB drive, or live-CD with save-file on USB, then the current work is kept in RAM and written to the save-file periodically. You can disable saves by the menu System -> Puppy Event Manager, then change the save-interval to zero.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 23 Sep 2011, 20:58    Post subject:  

Flash wrote:
Before I try it, will it work with a Racy multisession DVD?


Shutdownconfig is only for the first boot, before any save-file (or save to CD/DVD) is created.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7785
Location: qld

PostPosted: Fri 23 Sep 2011, 21:03    Post subject:  

Hi Barry.. pupdialog can't handle small screens Sad reported by aarf

I have been experimenting with <vbox scalable="true"> after detecting screen height (cutoff point is 600) but no good result yet, it may be an avenue of pursuit though.

Other than that the yellow is a bit garish! "lightyellow"?

Worked fine for me on 3 machines with normal screen res.

EDIT.. here is a rough patch that does work well enough, problem is the gui size is hard coded, only for small res, ok for res above 800x600
Code:
9a10,16
> #test screensize and set SCROLLABLE variable 01micko 110924
> SCRNSIZE="`xwininfo -root|grep -iE "height"|cut -d ':' -f2`"
> if [ "$SCRNSIZE" -le "600" ];then #kicks in at 800x600resolution, eee-701 is 800x480
>  SCROLLABLE=" scrollable=\"true\" height=\"400\" width=\"450\"" #leading space is essential
>  else SCROLLABLE=" scrollable=\"false\""
> fi
>
138c145
<
---
> #01micko 110924 <vbox> variable
140c147
<  <vbox>
---
>  <vbox${SCROLLABLE}>

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Sat 24 Sep 2011, 07:12    Post subject: Shutdownconfig: GUI shutdown
Subject description: internationalization
 

first step done:
changed scripts
created pot file
translation to German

Created zz_shutdownconfig-1a.pet

Test:
Rebooted wary5141 pfix=RAM
installed German language_pack
installed new zz_shutdownconfig-1a.pet

Menu>Reboot
Screenshot

Next steps (make everything translated) coming soon...

Why not make micko01's scrollable default?

---------------------------------------------------------------
Edited (for the records)
found the bug: not translated first 2 paragraphs

/usr/sbin/shutdownconfig line 576
changed from

T_subdir="`eval_gettext \"You can now choose to save the personal session files to a file, named '${DISTRO_FILE_PREFIX}save.2fs'. Your choice will be remembered at next bootup.

NOTE: You cannot choose to save the session to the entire partition \\\${xPDEV}, as Puppy is installed into a sub-directory '\\\${xPSUBDIR}'. If Puppy had been installed at '/', not in a folder, then you would have the option of saving the session to the entire partition (assuming that the partition does not have any other distro installed in it) which has the advantage of all the free space in the partition available for your session files.\"`"

to

T_subdir="`eval_gettext \"You can now choose to save the personal session files to a file, named '\\\${DISTRO_FILE_PREFIX}save.2fs'. Your choice will be remembered at next bootup.

NOTE: You cannot choose to save the session to the entire partition \\\${xPDEV}, as Puppy is installed into a sub-directory '\\\${xPSUBDIR}'. If Puppy had been installed at '/', not in a folder, then you would have the option of saving the session to the entire partition (assuming that the partition does not have any other distro installed in it) which has the advantage of all the free space in the partition available for your session files.\"`"

Variables in eval_gettext have not been escaped (\\\) so xgettext did not produce msgid

BTW: I had tried to use $(eval_gettext 'message text') but that did not work, just inside backticks it is working.

---------------------------------------------------------------
Note too:
Using eval_gettext has great advantage for translators.
In the example picture it it used also for the button texts, these have to be translated just once and are used twice: on the button and in the explanation text. No translating errors possible Smile
pupsaveconfig-1a.png
 Description   first run
just for fun
better one
coming soon
 Filesize   17.3 KB
 Viewed   1838 Time(s)

pupsaveconfig-1a.png

zz_shutdownconfig-1a.pet
Description  for developers ONLY
containing bugs
pet

 Download 
Filename  zz_shutdownconfig-1a.pet 
Filesize  50.93 KB 
Downloaded  411 Time(s) 
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Sun 25 Sep 2011, 08:35    Post subject: Shutdownconfig: GUI shutdown
Subject description: internationalization
 

Here is bugfixed version inclusive Barry's latest changes now Smile

Included is German translation
HOWTO make other translations (devx loaded):

cd /usr/share/doc/nls/shutdownconfig
msginit

will create a file <your_language.po>
edit this file in geany
fill the emty strings named msgstr
save it

msgfmt <your_language>.po -o - /usr/share/locale/<your_language>/LC_MESSAGES/shutdownconfig.mo
zz_shutdownconfig-20110925.pet
Description 
pet

 Download 
Filename  zz_shutdownconfig-20110925.pet 
Filesize  52.41 KB 
Downloaded  387 Time(s) 
Back to top
View user's profile Send private message 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Mon 26 Sep 2011, 08:59    Post subject: gettext in rc.shutdown.  

I was doing the same thing for Slacko langpack but now I'll just use this pet.

I have made Russian mo-file for the pet but I've found some errors and I have changed the code. Errors were in 'sanity check', 'fido', 'crypto', 'file clash'...
I have commented out extra variables and moved back to the original one line code of Barry.
And maybe root2user should also be modified.
Also console part localization will not work in Russian without UTF-8 enabled so maybe for console it should be LANG=C.
I can enable console UTF-8 in my lang-packs but it's not in standard Puppy.
zz_shutdownconfig-20110926.pet
Description  changed shutdownconfig with Russian translation added
pet

 Download 
Filename  zz_shutdownconfig-20110926.pet 
Filesize  87.74 KB 
Downloaded  378 Time(s) 
fido.png
 Description   fido bottom variable
 Filesize   31.58 KB
 Viewed   1763 Time(s)

fido.png

sanity.png
 Description   sanity check error
 Filesize   21.25 KB
 Viewed   1712 Time(s)

sanity.png

Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 27 Sep 2011, 06:45    Post subject: Re: gettext in rc.shutdown.
Subject description: international quality control is working
 

Barry,
I am hoping it is OK discussing issues of internationalization here, problems, questions, pitfalls, tricks, work arounds and solutions of course.

rodin.s,
thank you very much for your work, finding bugs and fixing them!
I have installed your version and it is working out of the box without ru locale.

Code:
LANGUAGE=ru shutdownconfig


rodin.s wrote:
...
And maybe root2user should also be modified.
Also console part localization will not work in Russian without UTF-8 enabled so maybe for console it should be LANG=C.
I can enable console UTF-8 in my lang-packs but it's not in standard Puppy.


If think if the strings are changed into another language before changing to LANG=C it will work. But testing is better than thinking.

UTF-8 might become standard, who knows?

I will have to update German...
shutdownconfig_ru.png
 Description   also for demo that
changing the locale
is not needed
 Filesize   22.34 KB
 Viewed   1691 Time(s)

shutdownconfig_ru.png

Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Tue 27 Sep 2011, 08:30    Post subject:  

Guys,
See my response here:

http://bkhome.org/blog/?viewDetailed=02499

The latest is zz_shutdownconfig-20110927BK.pet. This is based on what L18L sent me, has 4 - 5 bug fixes plus some small changes.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 27 Sep 2011, 12:41    Post subject: Shutdownconfig: GUI shutdown
Subject description: name clash
 

Using zz_shutdownconfig-20110927BK.pet.

SAVE TO A FILE
admin
RECOMMENDED chosen
ext2
save-file name
encryption

First shutdown: name clash
just the title and OK
message missing

fix by changing in line 400:
from
yesno “”
to
yesno “$T_yesno”
and the message will display:

To create another one, with a slightly different name....Select SAVE button

My expected behavior would be return to save.file name
but it was size save-file and then sanity check
Back to top
View user's profile Send private message 
Sylvander

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

PostPosted: Tue 27 Sep 2011, 15:34    Post subject: Re: Saved without asking on 2nd shuwtdown  

BarryK wrote:
If running from live-CD (with save-file on hard drive) or frugal installation (on hard drive), the work of your current session is immediately saved on the save-file. Thus, there is no choice possible for not saving it.

Can't believe I'm about to contradict you Barry...
...But I have my Lupu-526 [booted from a "live" CD-RW disk, with lupusave in a sub-folder on a partition on an internal HDD] set up so the pupsave on the HDD is treated as though a pupsave on a Flash Drive.
And then I have it configured so it NEVER auto-saves during the session [I can choose the moment to do it manually].
And then at shut-down/reboot I'm offered the choice "to save or not to save". Very Happy Cool

Here's an explanation of how I do it.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [33 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1091s ][ Queries: 13 (0.0131s) ][ GZIP on ]