Booting Kubuntu in 22 seconds
Eduardo Robles Elvira
edulix at gmail.com
Sat Mar 19 00:03:39 UTC 2005
Hi!
I'm Edulix, a recent new user of Kubuntu. First of all, thanks you all for
this excelent distro !
I've been modifying my system, having a nice time doing this and that trick.
Today I configured hibernate and saw it worked in my lapto, and that it was
really nice, so much that it could replace my usual booting sequence.
Note that for this script to work you need Hibernate working and configured !
More info about it in https://www.ubuntulinux.org/wiki/HoaryPM .
It happens that he new KDM let you specify which script you want to use to
halt system (from the KDE Control Center). The simple script that appears in
the end of the mail is aimed to be called by KDM when you tell it to boot.
What it does is just to restart KDE, then wait actual session to stop, and
finally suspend.
Thus, next time you boot Kubuntu it will wake up from hibernate state, and KDM
will be shown.
COpy the following text in a file, chmod +x it (to be able to execute it) and
then go to KDM module in KDE Control Center and specify that file as Halt
command:
------------------------------------
#!/bin/bash
# Halt system by hibernating it script
PID_FILE="/var/run/kdm.pid"
PID=`cat "$PID_FILE"`
PID2="$PID"
# Restart KDM so that next boot we'll be prompted with kdm
/etc/init.d/kdm restart
# Wait actual kdm session to close
while [ "$PID" = "$PID2" ]
do
if [ -f "$PID_FILE" ]
then
PID2=`cat "$PID_FILE"`
fi
sleep 1
done
# Finally hibernate sytem
/etc/acpi/hibernate.sh
------------------------------------
Now everytime you tells KDM/KDE to shutdown, it will just hibernate properly.
And next time you bnoot system, you'll awake it. You'll never see Init levels
anymore, and it will boot from GRUB to KDM in ~20 seconds !
Have a nice day,
Edulix.
More information about the kubuntu-users
mailing list