Difference between revisions of "Patch webOS Boot Themes"

From WebOS Internals
Jump to navigation Jump to search
Line 159: Line 159:
 
[[Image:Xaeonis-GunTux-palm-logo.png]]
 
[[Image:Xaeonis-GunTux-palm-logo.png]]
 
[[Image:Xaeonis-GunTux-palm-logo-bright.png]]
 
[[Image:Xaeonis-GunTux-palm-logo-bright.png]]
 +
 +
'''Title:''' bleeding apples
 +
 +
'''Author:''' predatory1
 +
 +
[[Image:Apv-palm-logo.png‎]]
 +
[[Image:Apv-Palm-logo-bright.png‎ ]]

Revision as of 20:05, 7 August 2009


When the Pre is booting or shutting down, the screen fades between two images - /palm-logo.png and /palm-logo-bright.png located in /usr/palm/sysmgr/images. By replacing either or both of these images, the boot logo can be customized. This requires access to the Pre's OS.

Works with: 1.0.3, 1.1

Replacing the Files

Step One Log into the phone via ssh and copy the files to the USB drive.

mkdir /media/internal/bootlogo
cp /usr/palm/sysmgr/images/palm-logo* /media/internal/bootlogo

Step Two Modify the files with your favorite editor (Gimp, Photoshop, ImageMagick, MS Paint, etc.)

Step Three Save the new images to the bootlogo directory on the Pre's USB drive.

Step Four Log into the phone via ssh, remount the root filesystem read-write, backup the existing files, copy the new images into place, and remount the root filesystem read-only.

sudo mount -o rw,remount /
sudo cp -ip /usr/palm/sysmgr/images/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png.orig
sudo cp -ip /usr/palm/sysmgr/images/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png.orig
sudo cp /media/internal/bootlogo/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png
sudo cp /media/internal/bootlogo/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png
sudo mount -o ro,remount /

Step Five Restart Luna and watch your awesome new logo.

pkill LunaSysMgr

Taking it to the Next Step

With a small bit of scripting, we can have separate boot and shutdown themes. The first thing to do is to create regular and "bright" images for booting and shutting down. Save the new images to the bootlogo directory on the Pre's USB drive. (Steps 1-3 above).

Step One Log into the phone via ssh, remount the root filesystem read-write, and create a directory in /opt to store the new images. We're using /opt, as the script we'll modify later will copy files, and /usr is mounted read-only.

sudo mount -o rw,remount /
sudo mkdir -p /opt/share/bootimages

Step Two Copy the new images to /opt/share/bootimages, naming them palm-logo-up.png, palm-logo-up-bright.png, palm-logo-down.png and palm-logo-down-bright.png. Additionally, copy the shutdown files to palm-logo.png and palm-logo-bright.png.

cd /opt/share/bootimages/
sudo cp /media/internal/bootlogo/<boot image> palm-logo-up.png
sudo cp /media/internal/bootlogo/<bright boot image> palm-logo-up-bright.png
sudo cp /media/internal/bootlogo/<shutdown image> palm-logo-down.png
sudo cp /media/internal/bootlogo/<bright shutdown image> palm-logo-down-bright.png
sudo cp palm-logo-down.png palm-logo.png
sudo cp palm-logo-down-bright.png palm-logo-bright.png

Step Three Backup the current logo images, if you haven't already.

sudo cp -ip /usr/palm/sysmgr/images/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png.orig
sudo cp -ip /usr/palm/sysmgr/images/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png.orig

Step Four Delete the current logo images and replace them with symlinks to the files in our new directory in /opt

cd /usr/palm/sysmgr/images/
sudo rm palm-logo-bright.png
sudo rm palm-logo.png
sudo ln -s ../../../../../opt/share/bootimages/palm-logo-bright.png palm-logo-bright.png
sudo ln -s ../../../../../opt/share/bootimages/palm-logo.png palm-logo.png

Step Five Back up and edit /etc/init.d/start_animation, adding the switching of the files

sudo cp -ip /etc/init.d/start_animation /etc/init.d/start_animation.orig
sudo -e /etc/init.d/start_animation

Before the line starting with if [ -x /usr/bin/luna-send add the following:

ok=no
if [ -f /opt/share/bootimages/palm-logo-up.png ] && \
   [ -f /opt/share/bootimages/palm-logo-up-bright.png ] && \
   [ -f /opt/share/bootimages/palm-logo-down.png ] && \
   [ -f /opt/share/bootimages/palm-logo-down-bright.png ] ; then
        cp /opt/share/bootimages/palm-logo-down.png /opt/share/bootimages/palm-logo.png
        cp /opt/share/bootimages/palm-logo-down-bright.png /opt/share/bootimages/palm-logo-bright.png
        ok=yes
fi

At the very end of the file, add the following:

if [ "$ok" = "yes" ] ; then
        sleep 5
        cp /opt/share/bootimages/palm-logo-up.png /opt/share/bootimages/palm-logo.png
        cp /opt/share/bootimages/palm-logo-up-bright.png /opt/share/bootimages/palm-logo-bright.png
fi

Step Six Restart Luna and watch your awesome new logos.

pkill LunaSysMgr

Boot Themes

Title: Default Theme

Author: Palm

Palm-logo.png Palm-logo-bright.png


Title: Tux - got root?

Author: JackieRipper

Jackieripper-palm-logo.png Jackieripper-palm-logo-bright.png


Title: Red and Green

Author: JackieRipper

Jackieripper2-palm-logo-up.png Jackieripper2-palm-logo-up-bright.png Jackieripper2-palm-logo-down.png Jackieripper2-palm-logo-down-bright.png


Title: Blue Tux

Author: pEEf

PEEf-palm-logo.png PEEf-palm-logo-bright.png


Title: Glassy Tux

Author: fish199902

Fish109902-palm-logo.png Fish109902-palm-logo-bright.png


Title: GunTux

Author: Xaeonis

Xaeonis-GunTux-palm-logo.png Xaeonis-GunTux-palm-logo-bright.png

Title: bleeding apples

Author: predatory1

Apv-palm-logo.png Apv-Palm-logo-bright.png