Home/News Updated - Faqs - Spec - Bugs - Ideas - Artwork - Code - Offline Webpage - Contributors


image

"Lassie" page based on Puppy 3.02 Alpha latest code base
"Phoenix" page based on Puppy 2.14r (retro) maximum stability for older hardware

image

image
Exit routine from Lighthouse Puplet
I have modified it, to make independent of KDE and use JWM as default

Lobster

#!/bin/sh
#startkde2
# ! -f /etc/windowmanager ] && echo "startkde" &>/etc/windowmanager; export CURRENTWM="startkde";
Xdialog --title Logoff --wmclass logoff --no-cancel \
--icon '/root/puppy-reference/mini-icons/mini.exit.xpm' \
--left --menubox 'Please choose\n an option' 320x240 4 \
'1' ' Shut Down - Power Off' \
'2' ' Reboot Computer' \
'3' ' Restart JWM' \
'4' ' Switch to IceWM'\
'5' ' Exit to Command Line' \
2>/tmp/MUlogout.tmp
r=`tail -n 1 /tmp/MUlogout.tmp`
if [ "$r" == "1" ];then
#poweroff
wmpoweroff
fi
if [ "$r" == "2" ];then
#reboot
# echo -n "reboot" > /tmp/wmexitmode.txt
wmreboot
exit 0
fi
if [ "$r" == "3" ];then
#restart window manager
restartwm
fi
if [ "$r" == "5" ];then
#console
rm -f /tmp/wmexitmode.txt
exit 0
fi
if [ "$r" == "4" ];then # restart to IceWM
MSG=`which gxmessage` || MSG=xmessage
$MSG -title 'Restart to IceWM' -name startkde -center -borderless -buttons '' "
Restarting to IceWM . . ." -geometry 300x60 -timeout 3 &
sync # sync drives & check for dangling starticewm procs
if pidof starticewm | grep [0-9];then killall starticewm; fi
if pidof kicker | grep [0-9];then
/usr/local/bin/killkicker
sleep 2
fi
rm -rf /etc/windowmanager
echo "starticewm" &>/etc/windowmanager; export CURRENTWM="starticewm";
restartwm
echo -e "Restarting X Windows... To Continue Type: ${cyan}xwin${NC} [Enter]"
exec xwin $CURRENTWM &
fi
exit

Last edited by CrustyLobster



CategoryDevelopment