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 Sun 21 Dec 2014, 14:19
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Derivatives
Menubar - Shutdown / Reboot Wizard - Legacy OS 2
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
john biles


Joined: 17 Sep 2006
Posts: 1409
Location: Australia

PostPosted: Thu 15 Sep 2011, 08:58    Post_subject:  Menubar - Shutdown / Reboot Wizard - Legacy OS 2  

Hello Legacy OS 2 users,
I have an old friend who is a bit think so to speak and keeps powering down his Laptop by holding down the "Power Off" button on the case instead of login out from the Applications menu. This really upsets Legacy OS 2 to the point where the xorg config file gets upset and Legacy OS 2 won't boot up anymore........... it's along story.

OK as I'm sick of fixing his laptop, I've written this little script add-on which adds a Shut-Down / Reboot Wizard to the menubar.

Now if he still too stupid to shutdown his laptop proper then there's truly something wrong with his brain. LOL!

For those wanting a quick way to shutdown or reboot Legacy OS 2 then install these 2 tar.gz files by unzipping them to / and Restart Icewm from the menu to update.
icewm-menubar-update.tar.gz
Description 
gz

 Download 
Filename  icewm-menubar-update.tar.gz 
Filesize  732 Bytes 
Downloaded  160 Time(s) 
Exit.tar.gz
Description 
gz

 Download 
Filename  Exit.tar.gz 
Filesize  4.07 KB 
Downloaded  156 Time(s) 
Menubar-Shutdown.jpg
 Description   
 Filesize   39.74 KB
 Viewed   2252 Time(s)

Menubar-Shutdown.jpg


_________________
Legacy OS 2.1 LTS Released! Install me on a new! EXT2 Partition with 500Mb of swap and I'll be happy. Razz
Legacy OS 4 Released! Install to newer legacy hardware / early EeePC's Very Happy
Back to top
View user's profile Send_private_message Visit_website 
TLM


Joined: 09 Mar 2010
Posts: 173
Location: Central United States

PostPosted: Thu 15 Sep 2011, 12:28    Post_subject:  

I wonder if this would work in the NOP puplets with XFCE? I have always found it annoying to have options in the XFCE shutdown menu that do not apply, and to date i do not believe that the XFCE shutdown manager supports any arguments such as --reboot so as to allow a person to configure their own. Would like to get rid of the standby and hibernate options in XFCE. Running reboot or halt from terminal in xfce broke my installation since they do not provide for shutting down the XFCE window manager properly.

I guess i am just particular. Its a pet annoyance of mine to have buttons or icons that do not work or do not work as expected, or are not applicable to the OS on which they are present, however in my case, it is an issue with the way XFCE is written, not with the puplets themselves.
Back to top
View user's profile Send_private_message 
john biles


Joined: 17 Sep 2006
Posts: 1409
Location: Australia

PostPosted: Thu 15 Sep 2011, 18:26    Post_subject:  

Hello TLM,
When you unzip the Exit.tar.gz file you'll find a directory called usr inside you'll find 2 directories called sbin and share. In sbin you'll find the script Exit-Wizard, this is the code used. When you read through it you will see the line

<action>icewmpoweroff &</action>

and

<action>icewmreboot &</action>

These are the lines you need to modify for use with xfce maybe change icewmreboot to xfcereboot and see what happens.

Those who know xfce should be able to give advice.

Lastly the icons are in the share directory.

Code:
#!/bin/sh

if [ "`which gtkdialog`" = "" ];then
 xmessage -center -title "ERROR" "This install of Legacy OS 2 has lost the application gtkdialog,
which in turn requires the gtk2 libraries package.
Gtkdialog is needed to run this Wizard.

Press OK button to quit..."
 exit
fi

export Wizard="
 <vbox>
  <hbox>
   <text>
    <label>What do you want to do?</label>
   </text>
  </hbox>
  <hbox>
   <text>
    <label>Shutdown</label>
   </text>
   <button>
    <input file>/usr/share/icons/shutdown.png</input>
    <action>icewmpoweroff &</action>
    <action>exit</action>
   </button>
  </hbox>
  <hbox>
   <text>
    <label>Reboot</label>
   </text>
   <button>
    <input file>/usr/share/icons/reboot.png</input>
    <action>icewmreboot &</action>
    <action>exit</action>
   </button>
  </hbox>
  <hbox>
   <button cancel></button>
  </hbox>
 </vbox>
"

#echo "$WizardWizard" | gtkdialog --stdin
gtkdialog --program=Wizard

unset Wizard


Also the other tar.gz file supplied is for Icewm only. Good Luck!

_________________
Legacy OS 2.1 LTS Released! Install me on a new! EXT2 Partition with 500Mb of swap and I'll be happy. Razz
Legacy OS 4 Released! Install to newer legacy hardware / early EeePC's Very Happy
Back to top
View user's profile Send_private_message Visit_website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Tue 27 Sep 2011, 06:38    Post_subject:  

hi john,

if you want that his way of doing things works without destroying/corupting files, you may look at acpid:
http://acpid.sourceforge.net/

Explanation from Arch-Wiki:
https://wiki.archlinux.org/index.php/Acpid

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
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 » Advanced Topics » Puppy Derivatives
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.0543s ][ Queries: 12 (0.0048s) ][ GZIP on ]