-
Senior Member
registered user
Script:animated boot and shutdown splash w/o kernel patch
This script uses the Knoppix background (which you can easily change on the CD, it's in knoppix/background.jpg) during boot *and* shutdown.
Also, shutdown is made faster by using poweroff -f (which should be fine as long as you are running purely from CD - otherwise you should take that part out before using the script.)
Call this script splash.sh, put it inside knoppix/ on your CD, choose a nice knoppix/background.jpg, and there you go. No more colorful Knoppix messages...
Code:
#!/bin/sh
#########################################################
#
# splash.sh 1.0
# by probono
# GPL
#
# burn this file to your Knoppix CD in /knoppix
# and boot with cheatcode "splash"
#
# displays knoppix/background.jpg
# during boot and shutdown
# and makes shutdown faster (by using poweroff -f)
# NO WARRANTIES, USE THIS ON YOUR OWN RISK
#
#########################################################
#
# display splash at boot time
#
fbi \
/cdrom/knoppix/background.jpg \
-t 1 --quiet --device /dev/fb0 < /dev/tty1 > /dev/tty1 2>/dev/null
#########################################################
# uncomment line below if you don't want
# xsession to be changed (e. g. if you have your own)
# exit 0
#########################################################
#
# modify xsession script to display splash at halt and be faster
#
mv /etc/init.d/xsession /etc/init.d/xsession.~
cp /KNOPPIX/etc/init.d/xsession /etc/init.d/xsession
perl -pi -e 's|# After xsession exits, end X-Server|sudo nohup fbi /cdrom/knoppix/background.jpg -t 1 --quiet --device /dev/fb0 < /dev/tty1 > /dev/tty1 2>/dev/null & \n poweroff -f|' /etc/init.d/xsession
#
# remove that voice
#
perl -pi -e 's|OGGPLAY=/usr/bin/ogg123|OGGPLAY=echo|' /etc/init.d/xsession
perl -pi -e 's|PLAY=/usr/bin/wavp|PLAY=echo|' /etc/init.d/xsession
#
# give control back to init
#
exit 0
-
Senior Member
registered user
Btw, this can easily be extended to include animations, a progress bar, truetype text etc. using the userland tools from http://www.bootsplash.org/user.html
Other than what the site suggests, the userland tools can also be used *without* the kernel patch.
For example, to have a nice progress bar animation (taken from http://www.bootsplash.org/themes.html):
Code:
#!/bin/sh
# userlandsplash 1.0
# fancy uslerlandsplash stuff
# by probono
# get the screen resolution
RESOLUTION=`/cdrom/knoppix/splash/fbresolution`
WIDTH=`echo $RESOLUTION | cut -f1 -d x`
HEIGHT=`echo $RESOLUTION | cut -f2 -d x`
# calculate the x and y coordinates for the animation
XCOORD=`perl -l -e "print ($WIDTH/2-101);"`
YCOORD=`perl -l -e "print ($HEIGHT*0.75);"`
#
# do some animation
# a progress bar could be done based on what is written
# to the console...
# /cdrom/knoppix/splash/progress $YCOORD $XCOORD 50 50 999999
# sleep 1
# /cdrom/knoppix/splash/progress $YCOORD $XCOORD 50 50 000000
# sleep 1
#
# display the animation
/cdrom/knoppix/splash/fbmngplay \
/cdrom/knoppix/splash/progress.mng -x $XCOORD -y $YCOORD &
# let this thing run until we are up and running
until [ "$RUNLEVEL" = "N 5" ]
### until ps -A | grep xsession
do
sleep 30
RUNLEVEL=`runlevel`
done
# then kill (softly, so that fbmngplay fades out) and exit
killall -INT fbmngplay
exit 0
[/quote]
-
Junior Member
registered user
Excellent tip there, i think ill use this one tonight for my remaster
-
Junior Member
registered user
This is very interesting stuff!!
But I need some more infos to understand this stuff:
- Are all scripts put into /cdrom/knoppix/ executed?
- If yes, when are they executed?
Do I habe to install the splash (userland?) software?
Thanks
-
Senior Member
registered user
![Quote](images/misc/quote_icon.png)
Originally Posted by
veuf
Are all scripts put into /cdrom/knoppix/ executed?
No, just knoppix.sh and in the newer Knoppix versions also splash.sh
![Quote](images/misc/quote_icon.png)
Originally Posted by
veuf
If yes, when are they executed?
knoppix.sh after the init process
splash.sh early in the init process (before the hw detection starts)
![Quote](images/misc/quote_icon.png)
Originally Posted by
veuf
Do I habe to install the splash (userland?) software?
Yes. Simply put the executables (fbmngplay etc...) in /cdrom/knoppix/splash for example and call them in the script from there.
-
Junior Member
registered user
Thanks for the tips!
I compiled fbmngplay.
But I didn't succees in showing picture with fbi AND showing the nimation with fbmngplay at the same time.
Where in your script is the boot-picture being loaded? I can only see fbmngplay.
I'd like to do:
fbi -q -a /cdrom/KNOPPIX/splash/bootsplash.png
fbmngplay -x XXX -y YYY /cdrom/KNOPPIX/splash/animation.mng < ... > ...
Can this be done lika that?
Thanks
-
Senior Member
registered user
http://mentors.debian.net/debian/dis...n/binary-i386/
has the bootsplash tools as debian packages which you can simply unpack with "unp -u" so that you don't have to compile them yourself.
The picture is loaded with
Code:
fbi \
/cdrom/knoppix/background.jpg \
-t 1 --quiet --device /dev/fb0 < /dev/tty1 > /dev/tty1 2>/dev/null
-
Junior Member
registered user
Thank you.
Using a code similar to the following, first the boot-splash is shown, then the animation is started. But following things are not okay yet:
1. I don't know the string for special Keys as "Esc", "F2" ... to stop the animation & splash
2. When I use the your proposed code that waits until init=5, the following happens: when the knoppix-background is loaded, the anmimation stays on top of the screen.
3. When a key is pressed after the splash image is shown AND before the animation starts, fbi quits, and only the animation will be shown (ugly)
Code:
#!/bin/sh
# get the screen resolution
RESOLUTION=`remaster/bin/fbresolution`
WIDTH=`echo $RESOLUTION | cut -f1 -d x`
HEIGHT=`echo $RESOLUTION | cut -f2 -d x`
# calculate the x and y coordinates for the animation
XCOORD=`perl -l -e "print ($WIDTH/2-101);"`
YCOORD=`perl -l -e "print ($HEIGHT*0.65);"`
# display the splash-screen and the animation
fbi -q -a /cdrom/KNOPPIX/bootsplash.png < /dev/tty1 > /dev/tty1 2>/dev/null &
sleep 2
fbmngplay /cdrom/KNOPPIX/animation.mng -S -x $XCOORD -y $YCOORD &
while read input; do
if [ "$input" = "Esc" ]; then # ??? Which special string ?
killall -INT fbmngplay
sleep 1
killall -INT fbi
exit 0
fi
done
exit 0
-
Senior Member
registered user
-
I know this is an old thread, but I tried this in v6.0.1 and I cannot seem to make it work. The splash cheatcode appears to do nothing. Is there an alternative method to accomplish this in 6.0.1?
-B
Similar Threads
-
By knoppixusr in forum Tips and Tricks
Replies: 8
Last Post: 02-10-2006, 07:01 PM
-
By spyhome in forum Customising & Remastering
Replies: 0
Last Post: 05-07-2005, 04:35 PM
-
By Coume in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 07-28-2003, 09:44 AM
-
By rickenbacherus in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 03-23-2003, 08:04 PM
-
By sireasoning in forum Ideas
Replies: 0
Last Post: 01-21-2003, 08:44 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![HITACHI HUS724040ALA640 4TB 7200RPM 64MB SATA 6.0Gb/s 3.5](/store/img/g/TIMAAOSw969gDuvf/s-l225/HITACHI-HUS724040ALA640-4TB-7200RPM-64MB-SATA-6-0G.jpg)
HITACHI HUS724040ALA640 4TB 7200RPM 64MB SATA 6.0Gb/s 3.5" HARD DRIVE ZERO HOURS
$52.00
![881507-001 HPE 2.4TB SAS 12G 10K SC 512E DS G8-G10 Hard Drive 881457-B21 F/S picture](/store/img/g/ghkAAOSwlaFlOC86/s-l225/881507-001-HPE-2-4TB-SAS-12G-10K-SC-512E-DS-G8-G10.jpg)
881507-001 HPE 2.4TB SAS 12G 10K SC 512E DS G8-G10 Hard Drive 881457-B21 F/S
$274.95
![Seagate ST1000VM002 1TB 64MB SATA6Gb/s 3.5](/store/img/g/tFMAAOSwjDVmceFV/s-l225/Seagate-ST1000VM002-1TB-64MB-SATA6Gb-s-3-5-Low-Pow.jpg)
Seagate ST1000VM002 1TB 64MB SATA6Gb/s 3.5" (Low Power) Hard Drive -PC, CCTV DVR
$24.99
![Seagate Exos X16 ST14000NM001G 14TB 512E SATA 6Gb/s 3.5](/store/img/g/-HkAAOSwJ69l-Fud/s-l225/Seagate-Exos-X16-ST14000NM001G-14TB-512E-SATA-6Gb-.jpg)
Seagate Exos X16 ST14000NM001G 14TB 512E SATA 6Gb/s 3.5" Enterprise Hard Drive
$169.99
![HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5](/store/img/g/buwAAOSwDghlwalj/s-l225/HGST-Ultrastar-DC-HC520-12TB-SATA-6Gb-256MB-3-5-En.jpg)
HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5" Enterprise HDD- HUH721212ALE601
$79.99
![HGST Ultrastar HE10 10TB SATA 6.0Gb/s 7200 3.5](/store/img/g/2NYAAOSwj9hkeS1e/s-l225/HGST-Ultrastar-HE10-10TB-SATA-6-0Gb-s-7200-3-5-Dat.jpg)
HGST Ultrastar HE10 10TB SATA 6.0Gb/s 7200 3.5" Datacenter HDD - HUH721010ALE601
$79.99
![Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5](/store/img/g/ZyMAAOSw4ullEigP/s-l225/Seagate-ST12000NM0127-12TB-256MB-7200RPM-3-5-SATA-.jpg)
Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$87.99
![WD Ultrastar DC HC530 14TB SATA 6G 3.5](/store/img/g/gggAAOSwwB5mL~fg/s-l225/WD-Ultrastar-DC-HC530-14TB-SATA-6G-3-5-7200RPM-Ent.jpg)
WD Ultrastar DC HC530 14TB SATA 6G 3.5" 7200RPM Enterprise HDD - WUH721414ALE604
$110.00
![Seagate Exos X22 ST22000NM001E 22TB 512E SATA 6Gb/s 3.5](/store/img/g/LfgAAOSw9~1l-F1x/s-l225/Seagate-Exos-X22-ST22000NM001E-22TB-512E-SATA-6Gb-.jpg)
Seagate Exos X22 ST22000NM001E 22TB 512E SATA 6Gb/s 3.5" Enterprise Hard Drive
$311.99
![Western Digital WD4000FYYZ RE 4TB 7200 RPM 64MB Cache SATA 6Gb/s 3.5](/store/img/g/3GsAAOSwVO1mEBDA/s-l225/Western-Digital-WD4000FYYZ-RE-4TB-7200-RPM-64MB-Ca.jpg)
Western Digital WD4000FYYZ RE 4TB 7200 RPM 64MB Cache SATA 6Gb/s 3.5" Hard Drive
$24.15