Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I code my own custom splash screen for Linux?

Tags:

c++

c

linux

This is NOT a question on plain old boring customization; I actually want to create an program, you know, with source code, etc...

I'm thinking about programming my own media centre interface, and I figured it'd look better if I coded my own splash screen for when the OS is loading.

Note: The media centre interface will be run in X, but this question is regarding what will happen before the X server loads.

Simply, I'd like to make a splash screen application to hide the linux kernel boot messages. Is there a way I can program some animation in to this like some sort of animated progress bar for example? I assume that I won't be able to code any 2D/3D graphics (as that'd require X to be running, right?), so how would I go about generating that?

I'd prefer to do this in C++, but C is also an option.

Note: I'm not looking to use any existing "themes" or anything like that, just interested in the programming side of things.

Update:

Some suggestions have been to use standard images (.bmp, .jpeg, etc), I am not interested in loading images in to an existing application. But obviously I may want to load images in to the boot screen application that I will make.

I'm not tied to a Linux distro, so this can be for anything, although Debian or a Debian-based distro would be nice.

I like the suggestion about loading the X server early and running a loading screen from there, however is there not a more direct approach? Surely you can make a program which hides the boot messages and shows a custom program? Obviously this would be very low level programming, but that's what I'm looking for...

Also, I'm not interested in altering the boot loader (LILO, GRUB, etc).

Update 2:

So far good suggestions have been looking at the source code for applications like splashy and fbsplash. Can anyone better this suggestion?

like image 658
Nick Bolton Avatar asked Mar 28 '09 15:03

Nick Bolton


2 Answers

For the graphical output you can use the Linux framebuffer, for application development you can use gtk which support rendering directly to the framebuffer GtkFB.

For the video and such you can use mplayer which also support rendering to the framebuffer.

For the initialization you have to look around the system used, debian uses a sysv init style initialization http://www.debian-administration.org/articles/212, ubuntu uses upstart.

like image 99
Ismael Avatar answered Oct 25 '22 19:10

Ismael


I'd look into splashy source code. But you will need to code in C.

If you have the skills, you can implement a software based 3D engine (like in the good old days). A simple rotating cube shouldn't be very hard to code and there are tons of tutorials. The downside is that you will increase the boot time, something not very pleasant in a media center.

like image 39
2 revs Avatar answered Oct 25 '22 20:10

2 revs