Phoenix CE - Automatic restart of X windows after "crash"

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

Phoenix CE - Automatic restart of X windows after "crash"

#1 Post by ecomoney »

Hi all

I know this has been brought up many times on the forum by new users. When using puppy in the cybercafe with pre 2.15ce versions (which has this feature by default) this used to cause more problems than anything else. I was surprised when I first (re) booted 3.00 that it hadnt made it into the mainstream distro release as yet.

Basically the theory goes, if x crashes (or more frequently, the inexperienced user does not restart/shutdown the computer properly) currently puppy dumps you unexpectedly at a black screen full of (to a new linux user) unintelligible writing. Surely this can be handled more gracefully? The theory of handling the user interface of this feature would be to

1. Explain what happened
2. explain what could have caused it
3. suggest possible solutions (just restart x, drop to the command line or edit xorg.conf)

There are already discussions and fixes to this problem here and here
Last edited by ecomoney on Mon 11 Feb 2008, 15:22, edited 1 time in total.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#2 Post by cb88 »

I like the fix in the second post which is basically what was in 2.15CE it really is a good feature for noobs

Code: Select all

#v1.0.7 J_Reys idea (see note further down)... 
if [ -f /etc/.XLOADED ];then 
 if [ "`cat /etc/.XLOADED`" = "true" ];then 
  #last time X ran, PC hung and had to be rebooted, or wasnt shut down properly 

  dialog --timeout 5 --yes-label "Start Normally" --no-label "Recovery Console" --yesno "Last time the computer was on, it didnt shut down properly. This could be because it wasnt shutdown properly from the icon on the desktop or the start button, or possibly (though unlikely) that it has developed a fault. Just press [Enter] to start normally (recommended), or the other option to go to the repair console. Remember to always shut down the computer properly when you have finished using it." 0 0 
  
  if [ $? -ne 1 ]; then 
  #if [ $? = 0 ]; then 
   rm /etc/.XLOADED 
    exec xwin 
  else 
    echo -en "\\033[1;31m" #34=blue, 33=yellow, 32=green, 31=red, 35=purple, 36=aquablue, 38=black. 
    echo ' 
Have now dropped down to the commandline. If you want to run the Xorg 
Video Wizard, type "xorgwizard" and press [enter]. After setting up the graphics again, 
type "xwin" to start X.' 
    echo -e "\\033[0;39m" 
    rm -f /etc/.XLOADED #otherwise cannot start X. 
    exit 
  fi 
 fi
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

2.14r base

#3 Post by ecomoney »

with the new puppy 2.14r base from Dougal and Pakt, this feature is already implemented!

something that does cause problems though (and Ive noticed this with 2.15ce as well) is that if the ethernet cable is unplugged then the word "getting I.P. Address from eth0) is displayed along the bottom of the message, obscuring the "continue" or "recovery console" buttons. Just a little bug, but it could cause confusion when, say the user moves the computer and has to disconnect the cables.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Post Reply